Fix library · Squarespace
Send www and non-www to one address on Squarespace
If your site opens at both www and non-www without one redirecting to the other, every page has two addresses. One permanent redirect fixes it for the whole site.
- A developer
- about 20 min
The fix: Pick one version, www or non-www, and 301-redirect every address on the other to the same path on it.
Step by step
- Choose the version to keep: usually the one already shown in Google and used in your links and ads.
- Set up a site-wide 301 redirect from the other version that keeps the rest of the address, so example.com/about goes to www.example.com/about, not to the homepage.
- Make sure your HTTPS certificate covers both names, so the redirect works without a security warning.
- Check that canonical tags, the sitemap and internal links all use the chosen version.
- Test a few pages on the other version; each should redirect in one hop.
On Squarespace
- In your Squarespace domain settings, set the primary domain; the other version then redirects to it.
Why it matters
When a site opens at both the www and the non-www address and neither redirects to the other, Google sees two addresses for every page, so links and other signals can be split between them, and the version shown in search may not be the one you prefer. A single permanent redirect from one to the other fixes it for every page at once.
For your developer
The problem is a twin host that answers 200 on its own host instead of a 301 to the main host. Add a host-level 301 that preserves path and query, ideally at the edge or CDN, and serve a certificate valid for both names. A rel=canonical alone is only a hint and doesn't stop visitors and links from landing on the duplicate host.
server {
listen 443 ssl;
server_name example.com;
# ssl_certificate and ssl_certificate_key for example.com go here
return 301 https://www.example.com$request_uri;
}