Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-12-11 19:19:40
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Pointing multiple domains to the same nameservers?
I suppose this is possible, but are there any disadvantages doing this? For example regarding search engines etcetera?
Offline
Re: Pointing multiple domains to the same nameservers?
Of course you point multiple domains to the same name servers…I think you mean “point multiple domains to the same server”. Do that too.
I use MT’s grid server and have about 40 all headed to the same account now. Some, of course, or just alternate domain names. But, instead of making them forward, I just make them work on their own.
Example: danberck.com & berckzerker.com
There’s no real disadvantage to this, IMHO.
Offline
#3 2006-12-11 20:04:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Pointing multiple domains to the same nameservers?
Okay thanks. I see how it works now. Only just found out that not all hosting accounts allow it.
Offline
Re: Pointing multiple domains to the same nameservers?
Hi Els
textdrive allows it
Knowledge Base article here
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2006-12-12 17:02:15
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Pointing multiple domains to the same nameservers?
Thanks colak. I just found out that the host that I thought didn’t allow it, actually does. So no problem.
What would be better: pointing the ‘secundary’ domains to the same account as the primary one, or redirecting them?
Offline
Re: Pointing multiple domains to the same nameservers?
I understand you are talking about “parked” domains, am I right?
I usually point the “secondary” or “alternative” domains to the same account and then add a rewrite rule to the .htaccess, so the URL displayed in the browser is always the “primary” URL.
What I try to avoid (but I dont know if I’m doing it well) is to have “duplicated entries” (one for the primary domain and one for the secondary domain) in a search results page.
Maybe, “two” domains with the same content would get penalized.
Last edited by maniqui (2006-12-12 17:14:12)
Offline
#7 2006-12-12 21:34:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Pointing multiple domains to the same nameservers?
maniqui wrote:
I understand you are talking about “parked” domains, am I right?
Yes that’s right. Someone I made a site for a while ago wants to buy some additional domains (containing some keywords that people might search for).
I usually point the “secondary” or “alternative” domains to the same account and then add a rewrite rule to the .htaccess, so the URL displayed in the browser is always the “primary” URL.
You mean the .htaccess of the primary account? So the difference with Walker’s example would be that in his case visitors requesting the alternative URL see the home page with that URL (and if they follow internal links that would lead to the original URL again), and in your case they would land on the homepage, seeing the original URL. Do I understand that correctly? Is one of these ways better than the other?
(These are probably all very dumb questions, but I just have never done this before, so I honestly don’t know…)
Offline
Re: Pointing multiple domains to the same nameservers?
You point all the domains to the same place, the Apache term is a ServerAlias, basically it says all these names get served from this folder. You can then put an .htaccess to check what the server name is and have it redirect to the dersired official server name.
I just did this for textbook if you want to take a peek at the .htaccess it rewrites www.textpattern.net and textpattern.net to textbook.textpattern.net
Shoving is the answer – pusher robot
Offline
Re: Pointing multiple domains to the same nameservers?
Els wrote:
You mean the .htaccess of the primary account?
Yes. I mean the .htaccess of the primary account. I think that, in the background mechanism, this works as a rewriting and not as a redirecting, but I dont know really.
This is an example of the .htaccess in the primary account (= main domain):
RewriteCond %{HTTP_HOST} ^alternative\.com$ [NC]
RewriteRule ^(.*)$ http://www.maindomain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.alternative\.com$ [NC]
RewriteRule ^(.*)$ http://www.maindomain.com.ar/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^maindomain\.com.ar$ [NC]
RewriteRule ^(.*)$ http://www.maindomain.com.ar/$1 [R=301,L]
(the latest two lines are for always adding “www” to the URL).
Offline
#10 2006-12-13 03:23:11
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Pointing multiple domains to the same nameservers?
You’re missing several backslashes there (remember that .
is a special symbol, so it needs to be escaped), and you can also simplify it a bit:
RewriteCond %{HTTP_HOST} ^(www\.)?alternative\.com$ [NC]
RewriteCond %{HTTP_HOST} ^maindomain\.com\.ar$ [NC]
RewriteRule ^(.*)$ http://www.maindomain.com.ar/$1 [R=301,L]
Offline
Re: Pointing multiple domains to the same nameservers?
Thanks, Mary, I will try your suggested simplification.
But let me tell you that the rules work without escaping the .
.
Of course, I don’t know nothing about .htaccess and I don’t have any doubt that you have more knowledge and understanding than me, but for some reason, the code I posted above seems to work flawlessly since few months ago.
Offline
#12 2006-12-13 16:23:48
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Pointing multiple domains to the same nameservers?
Great! Thank you all! :)
Offline