Welcome to The SmartGoat Blog! In this post, I’ll share my journey of transitioning my blog URL from the root domain
smartgoat.me to the www subdomain
www.smartgoat.me. Join me as I explore the reasons behind this switch, the benefits of using www, and the steps involved in making this change.
Busting some SEO Myths
Many SEO experts emphasize the importance of short URLs. However, my experience suggests that URL length is not as critical as it’s made out to be. Most visitors come from search results or referrals, and the distinction between www and the root domain doesn’t impact SEO, Google does not care, so are your users. A 301 redirect from the root domain to www, though, is essential.
Advantages of www subdomain
So, why choose www? Here are a few advantages:
- Cookies 🍪: Managing cookies becomes more flexible with www. You can not restrict cookies from subdomains, if it is used in root domain.
- CNAME Record: Setting up a CNAME record is sometimes the only option, especially if you use CDN services like AWS CloudFront or platforms like Netlify and GitHub pages. While Cloudflare offers CNAME flattening at root domain, my switch to www became necessary when I encountered limitations with other providers (for my case Ezoic).
Now, let’s explore the steps to transition from the root domain to www. The process may vary based on your setup and service provider, but the general steps look like this:
1. Changing Site URL: Adjust the URL in your CMS, such as WordPress, Ghost and others.
2. Hosting Provider/Webserver: Modify the URL at your hosting provider or update your webserver configuration i.e for Nginx modify the Vhost file.
3. Setting up a 301 Redirect at the Edge (Optional): Configure a 301 redirect between the root and www domains. Your hosting provider should offer it by default. Or configure the same in self-hosting environment. You can use Cloudflare Workers if your hosting provider doesn’t offer redirects.
SEO Impact of WWW switch
Addressing the big question – does switching domains affect SEO? The short answer is no, and the long answer is still no, provided you set up a proper 301 redirect and inform search engines about the change. Root or subdomain google does not care. Here’s a snapshot of my experience:
- Day 1: Switched the domain with proper redirects and submitted the sitemap to Google.
- Day 2: No significant changes in traffic.
- Day 3: Some blog posts started ranking with www, but not the main search.
- Day 4: All ranked URLs changed to www.
- Day 5: www.smartgoat.me appeared in Google Bard’s response.
No drop in traffic or ranking occurred, demonstrating that a well-executed domain switch does not negatively impact SEO.
A Potential Error while switching to www subdomain
A noteworthy error to be aware of is the Redirect Loop. While not common, it can frustrate old viewers. This issue arises if previous visitors typed www and were redirected to the root domain. To avoid this, ensure that nobody visited your site with the www URL before making the switch.
In conclusion, the decision to switch from the root domain to www brought about positive results without affecting SEO adversely. This transition can be seamless. But be cautious of potential errors like the Redirect Loop, and remember to inform search engines about your move. In my case I needed this, you may not need this at first, but from my experience though it is better to have www subdomain over a root domain.