yazo
By:
yazo

Domain www and non-www problem

December 11, 2016 367 views
Nginx Ubuntu 16.04

Hi folks,
just a quick question.

I have added my domain via Networking panel in www.domain.com format.
Now when i try to access the non www version (aka domain.com) i get an DNS error saying that DNS host address couldnt be found (of course, pinging it doesnt work).

How to sort this out? Is it via CNAME entries or directly via nginx?

Thanks!

2 Answers

You should add non-www version to Networking instead of www version.

Write down records for your current domain, delete it from Networking and add non-www version to Networking (e.g. example.com).

To make www version works, go to that domain and add CNAME record with Name www and Value @.

With this, both versions should work. You could have to wait some time for DNS propagation (update) to occur.

  1. check NS Record -> is there dns server record ?
  2. input in A record -> 2.a example.com ----> xxx.yyy.zzz.ip 2.b www ----> xxx.yyy.zzz.ip

after save wait 1 or 2 hours , then try ping

Have another answer? Share your knowledge.