Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Redirecting to holding page via name servers

Status
Not open for further replies.
Joined
Feb 12, 2006
Posts
121
Reaction score
7
Sorry if this has been covered before but I have a bunch of domains i'd like all redirecting to a holding page "this domain may be for sale" and I want to do it via the nameserver entry. I've had a quick look and can't seem to work out how to do it.

I presume I need to set up my own nameserver but is there a service that can be bought that just redirects all requests to an ip?
 
Have a chat to the folk at http://www.zerigo.com/ - they put together a custom deal for us based on having a large volume of domains but a (relatively) small number of DNS lookups on each one.

If you then host a website with a dedicated IP, you can get things set up so that all domains get redirected to that IP via the nameserver settings.
 
Nameservers are only one part of the equation. It just tells the domain which server to point the domains to. You don't 'need' your own nameserver to do that.

The hard work is what to do after it gets to the server. To do it the way I've done below will need root access i.e. vps or dedi server.

I've done it by creating a 'master' domain account on the server - just a normal domain account through cpanel for domain x.co.uk which has the home file system /home/x & web root /home/x/www. Create a directory in the web root e.g. /home/x/www/z

Then through cpanel go to dns functions and create a dns record for domains a b c etc using the primary ip of the server. This creates the dns zone files for the domains.

Then via SSH log into your server and go to your apache config directory and in the includes folder find the post_virtualhost_global.conf file. Inside that create a virtual host record for each additional domain... e.g. where xxx is your servers ip

<VirtualHost XXX.XXX.XXX.XXX:80>
ServerName a.co.uk
ServerAlias www.a.co.uk
DocumentRoot /home/x/public_html/z/
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/a.co.uk combined
CustomLog /usr/local/apache/domlogs/a.co.uk-bytes_log "%{%s}t %I .\n%{%s}t %O ."
</VirtualHost>

Save and restart the web server (i.e. apache if your using that).

The domains a b c if they have the namervers set up to point to the server will then redirect to the /z directory. But will show the correct domain in the url. You're effectively piggy backing the x.co.uk domains file system.

I've then created a db driven holding page which takes the referring domain i.e. a b c, strips out the domain name, gets some info for the domain e.g. price, status, ads and generated the page.

Of course you could create an account per domain in cpanel and just use the same script, but if you have xxx domains and a cpanel/plesk limited licence this isn't possible. This way you just use one account.

In theory you don't need the primary account, just a directory set up on the server which is web accessible. I've just used the x.co.uk for simplicity and as a potential redirect if needed. You could - which I've done - set up multiple directories e.g /a /b/ /c to use for different categories or groups.

S
 
I use the Parked Domains feature of cpanel at my host to do this everything points to the same folder and I have some PHP that works out the domain the visitor entered on and looks up some stats from a csv file.
Example cheap car insurance

I had to add each name manually I don't have that many. Depending on how many domains you have this could be quite a tedious process.
 
Last edited:
Thanks for the comments guys. It's appreciated. I'm looking into them now (although i use windows servers not linux).
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Auctions Ending - Flip.uk

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Register for the auction

Latest Comments

Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom