Subdomain redirection to another subdomain

6 replies
I would like to redirect a subdomain -

subdomain1.example.com to subdomain2.example.com

What is the best way to do that? using htaccess? DNS?

Any ideas are most welcome!
#redirection #subdomain
  • Profile picture of the author msu
    Probably htaccess because that would catch anyone accidentally going to the old subdomain1.
    Signature
    New to WordPress? Save time with my beginner's guide:
    WordPress Step-by-Step
    (for Kindle & Kindle Apps)

    I'm a top-notch WordPress developer: hire me
    {{ DiscussionBoard.errors[5978481].message }}
  • Profile picture of the author smileverse
    It can be easily done with the DNS. We can do it through "A" dns records, "CNAME" dns records, "NS" dns records. Even, a beginner can learn these things easily.
    {{ DiscussionBoard.errors[5978834].message }}
  • Profile picture of the author Earnie Boyd
    If subdomain1 has a separate DocumentRoot just do a 301 redirect in the index.html or index.php file. Otherwise, use the .htaccess file.
    Signature
    {{ DiscussionBoard.errors[5981144].message }}
  • Profile picture of the author geekology
    @smileverse: I would want to know what would be the best solution? The reason I would like to redirect is because I suspect people typing in the domain name may confuse the spelling. My subdomain is query.example.com , some people may type in queri.example.com.
    {{ DiscussionBoard.errors[5981544].message }}
    • Profile picture of the author Earnie Boyd
      Originally Posted by geekology View Post

      @smileverse: I would want to know what would be the best solution? The reason I would like to redirect is because I suspect people typing in the domain name may confuse the spelling. My subdomain is query.example.com , some people may type in queri.example.com.
      The simple solution here is to remove the * entry for the DNS A Record. The * specifies that anything for a sub domain is acceptable. Clearly you don't want this.
      Signature
      {{ DiscussionBoard.errors[5983051].message }}
  • Profile picture of the author ctzulu
    yes correct ^
    {{ DiscussionBoard.errors[5990809].message }}

Trending Topics