Choose one public website address and forward the other to it. Keep the preferred hostname in links, canonicals, and your sitemap. Test a specific page and a URL with a parameter before sharing the address.
Pick one address for customers to use
The bare domain is the address without a prefix, such as example.com. The www version is www.example.com. Either can be the address that visitors use. On an existing site, inspect the final address in your browser and look at published links before making a change.
If your site already uses one version consistently, changing it just to shorten the address creates extra work. On a new site, review what your host supports, pick the version you want to print, and make the same choice in your site settings.
Forward the alternate website hostname
Make the preferred website hostname work first, with a valid HTTPS connection. Then set up a permanent redirect from the alternate hostname. Redirecting the whole hostname should keep the path so a link to a service, article, or product still reaches that page.
If you use Cloudflare Pages, follow the Cloudflare instructions for forwarding www to a bare domain for that direction. Check the host documentation for your actual configuration. DNS points a name at a service. The web redirect tells a browser to load a different address. Leave working mail routing records in place.
Use the same hostname in site links and search metadata
Check the absolute links your site generates, the canonical tag on each sample page, and the URL entries in your XML sitemap. A canonical identifies the preferred URL for that page. The contact page canonical should point to the preferred contact page URL.
Update the homepage URL in places you manage, such as your business profile and email signature. Existing links at the alternate hostname should still work through the redirect, including links you cannot edit.
Test more than the homepage
Choose a normal page and one URL with a harmless test parameter. For example, visit https://www.example.com/services/?utm_source=example on a site that uses the bare domain. Confirm the final hostname, the /services/ path, and the parameter when your site needs it for attribution.
Test both HTTPS addresses and the plain HTTP entry points. Use the browser Network panel to confirm that the alternate hostname returns a permanent redirect and the preferred page returns a successful response. A warning, loop, or unexpected landing page needs attention before you promote the new address.
Keep a short record of the launch
Write down the preferred hostname, the redirect rule, and the test URLs. If you still need to attach a domain to your project, use the Cloudflare Pages custom domain setup guide. For the broader DIY publishing workflow, see BUILD • PUBLISH • OWN IT.
Need help with your domain or website hosting?
Share the address you want people to use, your hosting platform, and a link that currently acts differently between the two versions.