homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Adding DNS "A" records
For any domain

5+ Year Member

Msg#: 3850974 posted 10:29 pm on Feb 16, 2009 (gmt 0)


I am trying to set a server where to host all my domains, like a domain parking server.

I don't know where on the server I add the "A" record to associate the hosted domains to the server's IP address.

Curently it works by creating an "A" record for each domain at godaddy domain manager and entering server's IP as the "A" record's IP.

Can I configure the server's "A" records to host any domain *just* by setting the nameservers to NS1.myserver.com, NS2.myserver.com?



WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 3850974 posted 12:44 pm on Feb 17, 2009 (gmt 0)

in a word, yes.

the purpose of the name servers is to translate domains to ips.
you can direct as many domains as you can handle all to one ip including wildcard subdomains which are essentially infinite in number.
it is the web server configuration on that host that figures out how to handle the various domains and subdomains being directed to it.


5+ Year Member

Msg#: 3850974 posted 12:50 pm on Feb 17, 2009 (gmt 0)

Do you know what file[s] to edit in order to add the "A" records on my server?

I think I should add something like this:

mydomain.com. IN A 205.180.zzz.zzz

but I don't know where.

[edited by: adrianTNT at 12:54 pm (utc) on Feb. 17, 2009]


5+ Year Member

Msg#: 3850974 posted 3:57 pm on Feb 17, 2009 (gmt 0)

I could do it by adding this:

in /etc/named.conf:
zone "domain1.com" IN {
type master;
file "domain1.com";
allow-update { none; };

created /var/named-chroot/var/named/domain1.com:
$TTL 86400
@ IN SOA domain1.com. other.other.com. (
1997022700 ; Serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
10800 ) ; Minimum
domain1.com. IN NS
domain1.com. IN A
www.domain1.com. IN CNAME domain1.com.

domain1.com loads ok in browser now.

Is there a way to simplify this? I don't know if adding the zone was needed or not.
Ideally I would like it to work for any domain so that I dont have to do this for all my domains. Is there a way?

[edited by: adrianTNT at 3:58 pm (utc) on Feb. 17, 2009]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved