1

I am working on a wordpress website and I'm unable to access my website using the host-name. [However, I'm able to access my website through the ip address. For example, when I enter 10.20.0.18, I'm directed to 10.20.0.18/wp-admin/plugins.php]

I am new to hosting and I was just able to update my hosts file and properly link the ip address to hostname by reading through some articles.

I also checked these links are correct using ping command.

For example, my hosts file looks something like this,

#Host file starts here
127.0.0.1 localhost
10.20.0.18 www.webserver.abc.com
66.155.40.202 api.wordpress.org
#End of host file

Now, when I try to access the website using hostname through my web browser, I get this error.

This site can’t be reached www.webserver.abc’s server IP address could not be found.

I am not sure where I am going wrong, or do I need to make some more changes in other files?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Pooja
  • 11
  • 6
  • Are you working on a local machine or on a third party webhost? If you're hosting on the latter, did you point the DNS to the host (did you update the name servers)? – Justin R. Oct 17 '18 at 21:54
  • The error message says `www.webserver.abc` and your ping goes to `www.webserver.abc.com`. Are you sure you tried the hostname that ends with `.com`? – HugoTeixeira Oct 17 '18 at 23:24
  • @JustinR. I have been provided with a server, where I have a set up the LAMP stack. So, I currently SSH through my local machine and work on the server. What do you mean by update the name servers? (I apologize, I am a newbie and I have just updated the hosts file under etc) – Pooja Oct 19 '18 at 17:52
  • @HugoTeixeira Yes, In my hosts file I have the hostname that ends with .com and even the ping reply comes from the same hostname. I am also able to access my website using the ip address. For example, when I type 10.20.0.18 in my browser it directs me to 10.20.0.18/wp-admin/plugins.php, but I am not able to access the same website when I type in www.webserver.abc.com. The error is now being displayed as www.webserver.abc.com’s server IP address could not be found. Am I missing on updating any other files apart from hosts file? – Pooja Oct 19 '18 at 18:03

0 Answers0