Restrict Your Site to a Custom Domain Only

To ensure that visitors only access your site through your custom domain and not through default subdomains (-bullet.pages.dev or .bullet.site), add a JavaScript redirect to your site. This simple script will check the current domain and redirect users to the custom domain if they’re on a bullet site.

Add the Redirect Script

Paste this JavaScript code into the Code > Body section. Replace yourcustomdomain.com with your actual custom domain.

javascript


For sub-directory sites

However if you are on a sub-directory sites, you can simply replace “yourcustomdomain.com” with something like “yourcustomdomain.com/blog”. It would work seamlessly.

Was this page helpful?

How can we improve?