0

I have a domain, let's call it example.com. Now on the registrar DNS configuration I have the following records:

  1. A Record *.example.com xxx.xxx.xxx.xxx TTL(Automatic)
  2. A Record @ xxx.xxx.xxx.xx(same) TTL(Automatic)
  3. CNAME www example.com TTL(Automatic)

I want to create virtual subdomains, so when a user types for *.example.com(eg. as.example.com) the request is handled by the server installed on the main domain.

What can be wrong?

Edit: When I try to open for example ab.example.com on a server Google Chrome says This webpage is not available DNS_PROBE_FINISHED_NXDOMAIN

Edit: If I ping the main domain I get the correct answer, but If I ping the virtual subdomain then no response is obtained

  • What does nslookup ab.example.com return? It should return the ip address configured .If not, then check dns configuration again for mistakes. Post the exact dns configuration. – Diamant Mar 22 '16 at 8:56
0

There are two parts of the setup need to work. Check and make sure:

  1. The DNS Name resolution is correct i.e. subdomain names resolve to the correct webserver IP. For example, nslookup ab.example.com or nslookup cd.example.com should return the same ip address of the webserver.
  2. That webserver is handling the request correctly. This means in your case, for any request to *.example.com, the server should return the website for example.com.

For example See this: https://www.siteground.com/kb/how_to_add_a_wildcard_dns_record/

0

Problem solved using the following setup.

1. A Record   @      xxx.xxx.xxx.xxx    TTL(Automatic)
2. CNAME      *      xxx.xxx.xxx.xxx    TTL(Automatic)

The name resolution now is fine and the virtual subdomains are handled correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.