0

I am trying to point https://example.com to https://www.example.com

Because searching https://www.example.com loads the website with no issues, but searching https://example.com leads to an extremely long load time and then it just crashes to the screen where it says "website cannot be loaded / check proxy and firewall etc.

Is this an issue with the way the DNS has been setup? I set up 301 forwarding as well many days back but still having the same issues today.

HBruijn
  • 84,206
  • 24
  • 145
  • 224

2 Answers2

2

DNS can't forward, it can only alias (via CNAME). If you want forward, that's on your web server.

So, point example.com to your web server, using an A record (same IP address as www.example.com or a totally different server) and then configure the web server to forward from the bare domain to www.

As @Zdenek has reminded me, you can't put a CNAME on a bare domain.

HBruijn
  • 84,206
  • 24
  • 145
  • 224
Zac67
  • 13,684
1

Yes, this could be an issue with your DNS setup.

The habitual practise is set up the root domain as A type record, and the www as a CNAME type record pointing to @ or root domain.

If you have set up 301 redirect, ensure they are configured from example.com to www.example.com (subdomain) if you want to use www as default domain.

Also from the server side, check if you're using the .htaccess file to redirect requests from example.com to www.example.com in case to use Apache, a properly server block configuration for Nginx webserver.

HBruijn
  • 84,206
  • 24
  • 145
  • 224
mrexojo
  • 136