By using AWS re:Post, you agree to the Terms of Use

Numeric IP address reachable, but domain name not reachable


I have a domain registered through Route53, and I'm unable use the named address to reach my server.

If I connect using the public numeric IP address of my instance, I get the Apache default page.

If I connect using the domain name (or subdomain) I get "Can't connect to server".

Here's what I have done:

In Route53, my registered domain shows up under Registered Domains In Route53, when I click on Hosted Zones it shows two entries: ... HostedZone ... main site

I don't recall having created the first one, so I'm not sure why I have two. They are different from each other in the following way: The HostedZone one contains an NS, SOA and two CNAME records. The mainsite entry contains an NS, SOA, and two A records, one for each subdomain and each pointing to the public IP numeric address of my instance.

What am I doing wrong?

1 Answer


I understand that you are not able to reach the Default apache page with domain name, When you register for the domain in registered doamins, AWS will automatically create a Hosted Zone for you , It is simply a Control panel or DNS manager.

So, Now you have a HostedZone Configured let's say and You need to configure like the below. NS and SOA are created by AWS for you.

| Record Name | Record Type | Routing Policy | Value | --- | --- | --- | | | NS| Simple | ns-bla bla | | SOA | Simple | some entry | | A | Simple | IP Adress of Server | | A | Simple | IP Adress of Server

Okay, If the above DNS entries are good, Let's look at apache Configuration.

When you install apache, it will have the default configuration file in this location /etc/apache2/sites-available/000-default.conf , Please check ServerName and ServerAlias are present in the server

# Begin vhost record on the default HTTP port 80
<VirtualHost *:80>
    # This is the name of the vhost.
    # These are alternative names for this same vhost.
    # We put the other domains here. They will all go to the same place.
    # Directory where the website code lives.
    DocumentRoot /var/www/html

    <Directory />
    	Options FollowSymLinks
    	AllowOverride All


If about requirements are met you do not have any issues, If you have any issues please let me know


answered 6 months ago
  • Thanks very much for your answer! It was very helpful. What I was missing was an A record for the domain; I only had A records for the subdomains. I'm using a separate .conf file from the default in Apache, but that file had the correct info. Unfortunately it has stopped working without my having done anything. I'm still confused about why I have two hosted zones. Should I delete the other one that has the CNAME entries?

  • I dot not underatand the "CNAME" records, as far as i understand you have "A" records, So better check the apache is running or not, You can use the command "service apache2 status" to see apache is running, always you check the DNS information by enter the DNS using google

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions