1

I created a subdomain pointing to another IP address with an A-record about two hours ago. When I try to ping, like pinging from different locations (using online services), I get Unknown host:.

The domain itself works fine, and it has the DNS records of the account, from where I am creating the A-record. I am on shared hosting.

How much time approximately can it take for a record to start working?

Thanks

4 Answers 4

6

There is multiple things here.
First you should check if your DNS provider has put it on their DNS servers yet.
Some providers can take a bit of time to do that. E.g.:

$ dig -t A newrecord.example.com @ns.yourprovider.com

If that responds correctly, that's good already.
When a client requests the new record for the first time, it will now get the correct response.

If a client requested the record already while it did not exist, then it is caching the negative result.
The time depends on your configuration, and can be checked at your SOA record:

$ dig -t SOA example.com +short
sns.dns.icann.org. noc.dns.icann.org. 2014121047 7200 3600 1209600 3600

In that case it would be cached for 3600 seconds (last number in the SOA response).

4

It all depends on your DNS server's time to live (TTL). This metric defines how long the ISPs cache the DNS entry for. If it's set for 24 hours for example, no ISP will try that DNS server for 24 hours, because it has a cache of it already.

Most TTLs are less than 24 hours however; see if you can find that metric in your configuration.

It could also be a separate DNS cache either on your PC, or somewhere else, so try accessing it on another network.

8
  • 2
    This doesn't apply here as he says he created a subdomain (a new A record). TTL only applies to existing entries being modified, not newer entries being created.
    – Reaces
    Dec 19, 2014 at 11:58
  • Ah okay, fair enough - I think you're right. Dec 19, 2014 at 11:59
  • 4
    Not entirely, there is negative caching too.
    – faker
    Dec 19, 2014 at 12:00
  • 2
    @faker: Exactly. If you look up a non-existant host name and add it afterwards, the TTL will apply.
    – Sven
    Dec 19, 2014 at 12:03
  • @faker My understanding was that negative TTL is not entirely enforced. However if it is applicable it should show up as the TTL on the top SOA record. Is this correct?
    – Reaces
    Dec 19, 2014 at 12:06
2

You could set your local hosts file to point at the domain to test that everything is configured correctly. Are you sure your IP address is public facing?

If you are using Windows, your hosts file can be found in:

C:\Windows\System32\drivers\etc

You will need to add the following line:

{{IP address}}          {{domain}}
0

It depends on your SOA record and a record TTL. There are some time values for caching your DNS data. You can flush your DNS cache; it may help, but not always. At my DNS servers I use 15 minutes for caching.

2
  • This doesn't apply here as he says he created a subdomain (a new A record). TTL only applies to existing entries being modified, not newer entries being created.
    – Reaces
    Dec 19, 2014 at 11:59
  • generally hosting companies uses multiple dns servers. you edit one of master server. however queries are answered by slave servers. sync between them can take some time. Dec 19, 2014 at 12:40

You must log in to answer this question.

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