I bought 1 domain with different extensions (.fr, .com, .org, .net) and I've heard it's so bad for SEO not to redirect all of them to one only.
My question is quite simple. How do I do? I have a VPS with Apache2 on it.
Thanks!
I bought 1 domain with different extensions (.fr, .com, .org, .net) and I've heard it's so bad for SEO not to redirect all of them to one only.
My question is quite simple. How do I do? I have a VPS with Apache2 on it.
Thanks!
Let all of the domains point to one webserver and configure it like this (example given for apache):
# Necessary for named vhosts
NameVirtualHost *:80
<VirtualHost *:80>
# Accept all domains for this vhost
ServerName foo.com
ServerAlias foo.fr
ServerAlias foo.org
ServerAlias foo.net
RewriteEngine on
# Match requests that don't have the main domain only...
RewriteCond %{HTTP_HOST} (?:www\.)?foo\.(?:fr|org|net)
# ... rewrite them to use the main domain
RewriteRule ^/(.*)$ http://foo.com/$1 [R,L]
</VirtualHost>