www and apex domains
Attach the www hostname alongside each root domain and pick one canonical address.
On this page
example.com and www.example.com are two different hostnames, and each needs its own certificate and its own DNS records. Modulify handles both, and it is up to you which one visitors end up on.
Before you begin
You need a custom domain already added, on a paid plan, with the Manage domains permission. The www variant is offered for each root domain on the site, and a multi part root such as example.co.uk counts as one. A subdomain such as blog.example.com or shop.example.co.uk gets no www row at all.
Modulify adds the companion for you
When you connect example.com, Modulify adds www.example.com in the same operation and records its DNS requirements too. Its certificate is issued once its record points at Modulify and the domain is verified, see The ownership record. The success message names both: "example.com and www.example.com are both waiting on DNS. Add the required records at your DNS host, including the TXT record that proves you own example.com, to finish connecting them." For a domain that needs no TXT record, the message leaves that clause out.
Submitting the domain with a www. prefix makes no difference. Modulify normalises it to the root and treats the www form as the companion, so the root is always the domain on the card and the www hostname sits under it.
The companion is skipped when its hostname already belongs to this site or to another site in this workspace. The root is then added on its own, and the message names only the root. When a site in another workspace has the companion, Connect asks you to prove you own the domain first, and verifying it moves the companion along with the root, see One site per domain. The www variant never needs a TXT record of its own: the root's record at _modulify-verification proves both.
The WWW variant row
Each root domain's card shows its companion under its own heading, below the domain itself. It has its own Connected badge once it connects, its own Remove button and, while it is unconnected, its own DNS record to add. Every root domain on the site has its own companion, so a site with three root domains has three of these rows.
The heading reads WWW variant when the companion is the www hostname. If the card's own domain is already the www hostname, as it is after the root was removed, the heading reads Root domain instead and the button reads Add root.
When the companion is not attached, the row describes it as "Add www.example.com so visitors reach your site either way" and offers an Add www button. While it is attached but not connected, the description reads "Optional. Add the record below so www.example.com also reaches your site." While the root still needs its ownership record, it adds "It connects once the TXT record above proves the domain is yours.", because the TXT record sits in the root's table on the same card. Once it is connected, it reads "Your site answers also as www variant."
When the companion already sits on another card of this site, the row stays but its button is disabled, and the description and the button's tooltip both say so. This happens when you remove example.com, which leaves www.example.com on its card, then connect example.com again as a new card. The old card's Root domain row then reads example.com is already connected to this site. and the new card's WWW variant row reads www.example.com is already connected to this site.
On a free workspace Add www and Add root are disabled, and hovering them shows A paid plan is required to add a custom domain. Remove still works on every row. While the site's custom domains are paused, an attached companion has no badge and no records, and reads Not serving your site while paused.
Add www is refused with www.example.com is already connected to this site! when the site already has that hostname, and with www.example.com is connected to Lisbon Pottery. Remove it there first, then add it here! when a site in this workspace has it.
When a site in another workspace has www.example.com, the proof that example.com is yours covers it, because the www variant uses the root's TXT record. Once example.com is verified, Add www moves the www hostname to this card, that site stops answering on it straight away, and the toast ends with www.example.com was moved here from another site. Until then Add www is refused with www.example.com is used by another Modulify site. Once example.com is verified, add www.example.com again to move it here! A domain that was connected before Modulify asked for the record needs to be connected instead, and the message then says Once example.com is connected. Add root on a card whose root was removed works the same way for the root hostname. While example.com still needs its ownership record, the www variant waits for that TXT record too, and the toast says so: www.example.com is waiting on DNS. Add the required records at your DNS host, and it connects once the TXT record that proves you own example.com is in place too.
The row carries a Primary badge when its hostname is the site's primary domain. That happens when you chose that card with Make primary while its root is not connected, or, without a choice, while no card's domain under Your custom domain is connected and this is the first connected hostname in a WWW variant or Root domain row. See The primary domain.
Add the records
The www hostname needs a single CNAME named www, pointing at cname.modulify.website. Add it at the same DNS host as that domain's root record. If your DNS host already points www at your root domain, that works too and the row reads Valid. See DNS records for the full table.
It is completely normal for the root to read Connected while the www variant's record still reads Pending. Most people point only the apex and never add the www record, and nothing breaks. The site simply does not answer on the www hostname.
Both hostnames serve the site
This is the part that surprises people. The WWW variant is not a redirect. When both are connected, both serve the same pages from the same deployment and the same certificate, so your site genuinely answers at two addresses and search engines see the same content twice.
Pick one canonical address
Once both hostnames of a card are connected, an Ask AI hint appears on its WWW variant or Root domain row: "Want one address instead of two? Ask the AI to redirect the www variant to your root domain, or the other way round. It checks what is connected first, and the change goes live on your next publish."
Click Ask AI and the request is written into the chat box, naming that card's two hostnames and the direction, while the Domain panel stays open. Say which way round you want it if the default is not what you meant. The button is disabled while the request is still in the box, and asks before it replaces anything else you have there, see Requests from other panels.
The redirect is a host based rule added to your project's build configuration, keeping the path and query string intact. Because it is compiled during the build, it goes live on your next publish, not the moment the AI finishes editing.
The AI checks what is actually connected before writing anything. If only one hostname is connected, it refuses and tells you to connect the other one first, because redirecting to an address that does not resolve takes the site offline.
The hint only ever covers one domain and its own www variant. Several domains serving the same site is a normal setup, so chat never redirects one domain to another on its own. To send an old domain to your primary, ask chat for that redirect in your own words.
Removing one of them
Both rows have their own Remove button, and both ask before doing anything.
Removing the www variant asks "Remove www.example.com?" and explains that your site will stop working at that hostname while the root stays connected, or stays on the site when the root is not connected yet. The confirm button reads Remove variant, and the Variant removed toast reads "Your site is no longer reachable at www.example.com. example.com stays connected.", or ends with "example.com stays on the site." when the root is not connected yet.
Removing the root asks "Remove example.com?" with the same shape, and the confirm button reads Remove domain. If a www variant is attached, removing the root keeps the card with the www hostname as its domain rather than dropping both, and the message afterwards reads "example.com was removed. www.example.com is still connected, remove it separately if you want that one gone too." When the www variant is not connected yet, it reads "example.com was removed. www.example.com stays on the site, remove it separately if you want that one gone too." The card then offers the root back under Root domain with Add root. When the card still needs its ownership record, the www hostname keeps the same TXT record, because that record sits on the root domain.
Only that card changes. Removing a root or a www variant never touches the site's other domains or their www variants.
Removing a domain needs the Manage domains permission. A site can have up to 10 custom domains, and each one can carry its own www variant.
Next
- DNS records lists what each record does.
- Troubleshoot a domain covers a hostname stuck on Pending.
- Your free web address is the address your site answers on alongside every domain you connect.