DNS help: redirect from root to www

Hey so I recognize I’m a bit over my head with this. Tried googling for a resolution but I could not find an example for this. There’s many examples for the other way round (www → root) but can’t seem to find an example for this (root → www).

I’ve got a gaming website that is hosted on guildtag. The site works well when using https://www.domain.com address, but trying the root address https://domain.com does not seem to work.

So far I’ve tried a CNAME for the root (which I’ve read is perhaps frowned upon?):

The first test results in

This page isn’t working

**domain.com** didn’t send any data.

I’ve also tried meddle with the Rules. Do I need a 301 redirect in addition to the CNAME? Or does a redirect rule work without the CNAME part? I can’t seem to grasp the 301 redirect syntax. Any chance someone has a ready example for the Rules → Redirect rules -section?

So thankful for any help…

Deprecated - Redirect example.com to www.example.com is precisely what you are looking for.

Follow the archived content.

Thanks Sandro. The page is deprecated. If I understand correct, the new page does not list an example for root->www redirect. I think I need a little handholding on this!

Is the CNAME I’ve set up okay for this usage? Does the resulting …
This page isn’t working
domain.com didn’t send any data.
…mean that the CNAME works, and Cloudflare is now considering Rules->Redirect rules -section functions? Or could it mean that it works and is redirected to guildtag webiste, but guildtag is not supporting addresses without the www prefix?

I’ve gotten this far (img below) but it’s not working. How would you edit this 301 rule?

It’s not really deprecated and the new rule instructions are not complete, hence why I suggested to use page rules. Plus, your DNS entries are not proxied (as the tutorial instructs) and hence it cannot work.

Understood… I guess I’m out of luck then. Guildtag says Orange clouding (proxy) does not work with their service.

I will try to proxy the ROOT->WWW (cname), and leave the www->guildtag cname unproxied… this is a last ditch effort.

:orange: may not work for “www” but it will work for the naked domain.

1 Like

Also make sure your encryption mode on Cloudflare is Full Strict.

1 Like

Fantastic! It works. A big, big thank you Sandro :pray:

→ seemed to work with the 301 rule I posted before (didn’t have time to change it)
→ as long as the root a-record was proxied
→ didn’t matter if encryption was set to Full (Strict) or Flexible, but set it to Full (Strict) anyway

Also, in the end, the root->www was not a cname, but an a-record that pointed to as per the guide

Why I specifically pointed that out :slight_smile:

Afraid you always need to make sure it is Full Strict, otherwise the site is left without security


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.