404 Not found when omitting www

Answer these questions to help the Community help you get started.

What is the domain name?
jeremylahners_com

Have you searched for an answer?
Yes

Please share your search results url:
http://jeremylahners.com

When you tested your domain, what were the results?
Works great with www_jeremylahners_com

Describe the issue you are having:
Omitting the ‘www’ results in 404 Not Found. I have A records for * and root pointing to the correct IP address. I have a CNAME for www. I have a Page Rule set up (.jeremylahners.com/) to forward from this domain to my page hosted by my company.

What error message or number are you receiving?
HTTP Status: 404 (not found)

What steps have you taken to resolve the issue?

  1. Reviewed DNS entries
  2. Researched on Google
  3. Researched on Community

Was the site working with SSL prior to adding it to Cloudflare?
Yes

What are the steps to reproduce the error:

  1. Go to http://jeremylahners_com

Have you tried from another browser and/or incognito mode?
Yes

Hi there,

a 404 status always comes from origin. If you’re only getting that status when visiting the address without www, likely your origin is pointing the apex to a different path than the www.
This will happen whether you’re proxying your DNS records or not.

The best way to fix it would be at your origin server - contact your hosting provider if needed - and make sure the root domain is getting the content from the same folder as the www.

Alternatively you could simply create a redirect rule at Cloudflare to always add the www. before the address.
To do this go to Rules > Redirect Rules > + Create Rule and create a rule like this:

Take care.

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