Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have four domains:

domain.in
domain.com
domain.org
domain.co.in

I want to make domain.in as my main domain. I want to forward all my other domains to it. I want to set up forwarding such that:

  1. domain.com goes to domain.in
  2. www.domain.com goes to www.domain.in
  3. xyz.domain.com goes to xyz.domain.in
  4. abc.domain.com/path/to/directory goes to abc.domain.in/path/to/directory

How can I do that?

Screenshot of my registrar's domain forwarding form

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You won't be able to do that with the options that your registrar give you. You will have to point your domains to your web host (probably with wildcard DNS) and do it yourself.

Here is a rewrite rule that you can put in your .htaccess file that will redirect any subdomain and path of domain.com, domain.org, or domain.co.in to the corresponding subdomain and path of domain.in

RewriteCond %{HTTP_HOST} ^(.*)domain\.(com|org|(co\.in))$ [NC]
RewriteRule ^(.*) http://%1domain.in/$1 [L,R=301]
share|improve this answer
    
Thanks, Stephen! Do you know of any registrar which provides these options? It looks like a very obvious feature to me (for example to redirect misspelled domains etc.) –  Rohit Agarwal May 28 '13 at 10:09
    
Registrars typically only off the simplest redirect options. Implement this off of the registrar. –  Stephen Ostermiller May 28 '13 at 10:12
<meta http-equiv="refresh" content="0;URL=http://www.theothersite.com">

If you don't fancy rewriting anything, just pop that into a web-page and Bob's your uncle.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.