Ask a Question
Advertise on boostr.in
how Are your DNS Settings Directing you to the Correct Place on linux os?
If you can reach your site through the IP address, but not through the domain name, you may need to take a look at your DNS settings.
In order for visitors to reach your site through its domain name, you should have an "A" or "AAAA" record pointing to your server's IP address in the DNS settings. You can query for your domain's "A" record by running this command:
host -t A example.com
example.com has address 188.8.131.52
The line that is returned to you should match the IP address of your server. If you need to check an "AAAA" record (for IPv6 connections), you can type:
host -t AAAA example.com
example.com has IPv6 address 2606:2800:220:6d:26bf:1447:1097:aa7
Keep in mind that any changes you make to the DNS records will take quite a long time to propagate. You may receive inconsistent results to these queries after a change since your request will often hit different servers that are not all up-to-date yet.
If you are using DigitalOcean, you can learn how to configure DNS settings for your domain here.
Make sure your Configuration Files Also Handle your Domain Correctly
If your DNS settings are correct, you may also want to check your Apache virtual host files or the Nginx server block files to make sure they are configured to respond to requests for your domain.
In Apache, the section of your virtual host file might look like this:
. . .
This virtual host is configured to respond to any requests on port 80 for the domain example.com.
A similar chunk in Nginx might look something like this:
¬†¬†¬†¬†listen 80 default_server;
¬†¬†¬†¬†listen [::]:80 default_server ipv6only=on;
¬†¬†¬†¬†index index.html index.htm;
¬†¬†¬†¬†server_name example.com www.example.com;
. . .
This block is configured to respond to the same type of request that we discussed above.
. . .
Jun 9, 2015
Sep 9, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please