Redirect Non-www to www fail to work

Hi,

Two Page Rules as configured

mysite.com 301 to https://mysite.com
mysite.com/* 301 to https://mysite.com/$1

However, it doesn’t work at all.

Appreciate if you can provide professional advice. Thanks!

Addressed at Redirect example.com to www.example.com

Whats your domain and post a screenshot of your page rules.

1 Like

Thanks a lot! It works! However, some countries cannot handle the URL redirection. Would you have any advise on this ?

Thats not a redirection issue, but presumably some network issue on that service’s side.

Thanks! However, when I perform the test using www subdomain, all tests are ok.

There are some countries accessing the non-www root domain failed.

They both refer to the same website. non-www was redirected to www using page rule.

www test:

non-www test:


This is my domain: premiaetf.com

Screenshot :

For starters, you only need the second page rule in this case.

Secondly, you seem to have some weird DNS setup for your www record, where you have set up NS records for it. Remove these and make sure your www record only points to our server.

Enabled only the second page rule :

Secondly, I change the www record pointing to a server with fixed IP. However, the result is the same.

Loads fine for me a this point

image

and also at sitemeer.com/#https://www.premiaetf.com

Thanks again! however, the result from uptrends shows several countries are still failure to connect for the non-www domain premiaetf.com .

For www domain www.premiaetf.com, it’s fine for all countries. We used uptrends for long time and it also show green in all countries in the past.

That is the opposite of what you said earlier, that www fails but the naked domain works.

Anyhow, the naked domain seems to work too -> sitemeer.com/#premiaetf.com

I’d attribute this to some caching issue on their side because of your earlier DNS misconfiguration.

Do you mean I need to wait several days for it to stabilize ?

Besides, www was configured to be NS record because it’s our load balancing structure. It has been working fine in our primary website in another registrant for long time.

I cant tell, that depends on their service and what they are doing. All I can say is, your site loads, works on sitemeer.com too, and the DNS configuration is correct.

As for your NS records, that wont work in a Cloudflare context, unless you dont want to proxy and even in that case you wouldnt use NS records, however that topic would be beyond the scope of the forum here.

Actually, the website is working before I change www pointing from a NS record to a fixed IP.

For both case (NS record or a fixed IP), the non-www domain premiaetf.com also cannot be reached at some countries.

Sorry, but again, this is contradicting what you said earlier.

So you say the issue is your naked domain? So www is out of the picture?

In that case, I can only repeat what I said earlier. Your DNS setup is fine, your naked domain is proxied, the page rule works properly, and it redirects correctly to your www record.

If the service you are using is having issues, these are most likely on their end.

No need to say sorry at all. It’s fine! :blush:

I mean there are some counties failed to redirect from premiaetf.com to www.premiaetf.com.

As you can see from some webpage test website (e.g. uptrends), there are some countries appear as red when test it by premiaetf.com.

When test it by www.prmeiaetf.com, it appear green in all countries.

That will be an issue on that service’s end and is probably caching related. If you wait a couple of hours it might fix itself.

As you can see at sitemeer.com/#premiaetf.com it actually works fine in all its regions.