homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Wildcard Domains NOT subdomains

Msg#: 4401897 posted 8:49 am on Dec 28, 2011 (gmt 0)


I'm setting up a web server using Apache and I want to make it so that ANY domain (domainname.com) pointed to my nameservers (ns1.myserver.com and ns2.nyserver.com) will be directed to the default document directory. It will not go to different folders per domain, but rather all will direct to the same default document root.

Thanks in advance!



WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4401897 posted 10:05 am on Dec 28, 2011 (gmt 0)

Assuming for the sake of discussion that you mean "mass redirect" not "wildcard domain" (which I kinda think is impossible unless you have bought IANA)...

Sure. Let's see what your config file looks like so far. Not the whole thing, just the parts that pertain to redirecting.


Msg#: 4401897 posted 10:33 am on Dec 28, 2011 (gmt 0)

WI'm only trying to make it so that if users point their domain to my nameservers, it will automatically direct ALL requests to the default html directory. The same folder.

I called it wildcard, because I wanted it to work the same way wildcard 3rd level domains work on Apache.

Since I'm not requiring each domain pointed to the server to go to different folders / accounts, it seems this should be pretty easy to do...but I can't find any info on it.


Msg#: 4401897 posted 10:34 am on Dec 28, 2011 (gmt 0)

And I don't have the config file to share because I'm investigating...the server hasn't even been setup yet.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 4401897 posted 11:44 am on Dec 28, 2011 (gmt 0)

spinmeister - if you setup a default directory for the IP number you will point your domains to, apache will take the default (index.htm/php/etc) out of that directory. you do not need to do much!

every domain pointing to an apache that is not configured in virtual hosts or with the servername is served out of the directory for the IP you configured.



Msg#: 4401897 posted 11:54 pm on Dec 28, 2011 (gmt 0)

But we won't be pointing the domains to an IP...here is what we want. We want clients to be able to point their domains to our nameservers that we provide to them, and when the DNS on those nameservers is hit with a request, it just automatically will direct to the default document folder.

we don't want to have to put zones in there for each and every domain pointing to those nameservers and we don't want the clients to have to do anything except update the nameservers for their domains.

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