List view
Managing content in Notion
Managing content in Notion
Understanding Bullet dashboard
Understanding Bullet dashboard
Hosting
Hosting
Membership/Content Gating
Membership/Content Gating
Blog
Blog
Knowledge base
Knowledge base
SEO and metadata
SEO and metadata
Liquid Syntax
Liquid Syntax
API Documentation
API Documentation
Billing
Billing
How to's
How to's
Themes
Themes
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 Code > Body section. Replace
yourcustomdomain.com
with your actual custom domain.javascript Copy code <script> (function() { const currentHost = window.location.hostname; // Specify your custom domain here const customDomain = "yourcustomdomain.com"; // Check if the current host includes "-bullet.pages.dev" or ".bullet.site" if (currentHost.includes("-bullet.pages.dev") || currentHost.includes(".bullet.site")) { // Redirect to the custom domain while preserving the path and query parameters const newUrl = window.location.href.replace(currentHost, customDomain); window.location.replace(newUrl); } })(); </script>
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.