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 has address
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 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:

    DocumentRoot /var/www/html
. . .
This virtual host is configured to respond to any requests on port 80 for the domain

A similar chunk in Nginx might look something like this:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;
    root /usr/share/nginx/html;
    index index.html index.htm;
. . .
This block is configured to respond to the same type of request that we discussed above.


. . .

asked Jun 9, 2015 in LINUX by rajesh
edited Sep 9, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.