Open Terminal and enter the following command. You will be prompted to enter the admin user’s password.
sudo nano /etc/hosts
Use the arrow keys and move to the next empty line. You’re going to enter the following here;
127.0.0.1
www.tiktok.com
127.0.0.1 tiktok.com
tap the Control+O keyboard shortcut to save the changes. Tap Enter. Control+X to exit it.
Open terminal again and type
sudo dscacheutil -flushcache
If you want to remove and access tiktok again, just edit the file again and remove the lines.
also if for some reason it still keeps popping up, the only thing to do is to add the complete domain list:
127.0.0.1 v16a.tiktokcdn.com
127.0.0.1 p16-tiktokcdn-com.akamaized.net
127.0.0.1 log.tiktokv.com
127.0.0.1 ib.tiktokv.com
127.0.0.1 api-h2.tiktokv.com
127.0.0.1 v16m.tiktokcdn.com
127.0.0.1 api.tiktokv.com
127.0.0.1 v19.tiktokcdn.com
127.0.0.1 mon.musical.ly
127.0.0.1 api2-16-h2.musical.ly
127.0.0.1 api2.musical.ly
127.0.0.1 log2.musical.ly
127.0.0.1 api2-21-h2.musical.ly
Creating an OpenDNS account and setting your router to their DNS IPs will block tiktok on the network and all devices that are on it. That is also a possibility.