3

I have recently setup a personal website using github pages for hosting and DNS with freenom.

When I make a request using curl:

curl --header "Host: example.com" http://192.30.252.153/

I get the expected response, the HTML from my site, however, when I try to access the page through a web browser I get a generic

example.com’s server DNS address could not be found.

Is/are there a reason(s) why I am getting what appears to be mixed results?

Note: I followed the instructions I found on stackoverflow about how to set this up.

1
  • Write in your browser directly http://192.30.252.153/. Your DNS is not able to resolve the address in IP. When you incur in problem like that simplify your command line from all the not needed parts, and for your command becomes curl http://192.30.252.153/ where it is evident that you are not asking to reach example.com but that IP. :-)
    – Hastur
    Mar 15, 2016 at 6:33

1 Answer 1

3

With the Curl call you are not using DNS, you are asking curl to go direct to the destination IP, but to tell the server which site you are after by sending a host: header.

With your browser, you are just putting the URL straight into the address bar, and so your DNS server must resolve example.com. It is unable to and so produces an error.

So the conclusion is that the DNS is not set up correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .