Published
May 31, 2024
Updated
May 31, 2024
Webflow's default domains concept has some peculiarities.
While it's not technically required, if you skip setting a default domain, you'll likely face a series of issues. Here's a breakdown of what I've seen.
What does default domain do on a single domain site?
Let's suppose you have only one custom domain on your site. It has the "naked domain" domain.com
, and also your "www" subdomain www.domain.com
.
Let's further suppose you set the "www" subdomain as the default domain, as recommended by Webflow.
When you have a default domain set
- Any requests to
domain.com
get redirected towww.domain.com
- Webflow works properly, with any DNS
When you have NO default domain set
- Some site owners will experience errors like double
www.www
prefixes, or infinite redirects. - Your
sitemap.xml
may containdomain.com
, orwww.domain.com
, unpredictably.
It's possible to make domain.com the default domain, but only in a special DNS configuration that requires support for CNAME flattening. Most DNS providers don't support this, but some, like Cloudflare, do.
What does default domain do on a multiple-domain site?
Let's suppose you have two domains, domainA.com
, and domainB.com
on your Webflow site.
When you have a default domain set
If you set www.domainA.com
as the default domain-
- Any requests to
domainB.com
,www.domainB.com
, ordomainA.com
get redirected towww.domainA.com
- Webflow works properly, with any DNS
- Your
sitemap.xml
will containwww.domainA.com
, consistently.
When you have NO default domain set
- Some site owners will experience errors like double
www.www
prefixes, or infinite redirects. - Your
sitemap.xml
may containdomain.com
, orwww.domain.com
, unpredictably. - Your
sitemap.xml
may containdomainA.com
,www.domainA.com
,domainB.com
, orwww.domainB.com
, unpredictably.