Changing my site from https://example.com/ to https://www.example.com/

#1

I had some issue with cloudfare due to which i am unable to fully optimise it, i reached my host and asked for help. Here is what he recommended

Reply: OK, what I can see is that your website actually uses a non-www URL. The Cloudflare service on our end works fully when the website is configured to load under https://www.example.com/ . In your cases it loads under https://example.com/. The WWW record is basically the DNS record pointed towards the Cloudflare network and services. This needs to be updated to use www in your Wordpress General settings ( wp-admin / settings/ General settings - there are 2 Fields for defining which URL the site uses)

shourav agrawal: But will that affect my search ranking as well or give 404 error or any other error?

Martin Sim.: It should not result on any 404 errors,. When it comes to SEO , it would be best to consult on this with an SEO specialist as this might depend on how you optimized and configured your website.

What do you think? @GulshanKumar sir
Please mention the steps i can follow to do so!

#2

First, don’t change to www. There’s no benefit of www in a domain!

Second, if you still want to change then it will take time for Google to change the URLs in its index and traffic may drop for some time but it will be back provided that you have correctly setup all the URLs everywhere (in CF, GSC etc.).

1 Like
#3

Need to do it to make cloudflare work properly.

#4

No! Domain can work properly without www.

You must be doing something wrong.

#5

You are not understanding the issue correctly, The problem is in cloudflare not working properly as the main dns record that points contains www but my orignal site loads as non www version

#6

TLDR: If you want to leverage full benefits of Cloudflare, always setup manually by creating a proper new Cloudflare account instead taking a shortcut route of cPanel one-click Cloudflare setup, it simply doesn’t work for non-www at all.


As you can see . . .

Your domain is using Siteground name servers.

image

non-www version is exposing Server IP

while www version is pointing to Cloudflare

Because, they have pointed CNAME www is pointed to Cloudflare server
image

So, why didn’t Siteground was able to do this for non-www also? :thinking:

It’s normal, cPanel based DNS resolver doesn’t support CNAME for the apex hostname like below

CNAME - example.com - cloudflare-xyz-cdn.com

I hope this clarifies the problem cause.


Solution

Setup Cloudflare manually

  1. You should create a new Cloudflare account

  2. Add your domain

  3. Make sure to maintain neccessary records, at least these two.

A - @ - your server IP - Automatic - Proxy on
CNAME - www - yourdomain.com - Automatic - Proxy on
  1. Update Cloudflare Nameservers at DNS registrar

Now, www and non-www both will be served via Cloudflare.

For more details, check below guide.

1 Like
#7

Does that mean till date my site is loading without cloudfare?
Lol its my first time i tried non www site

#8

Yes. Since you are using non-www, 99.9% traffic is not hitting Cloudflare server.

#9

Do i need to delete the old account?