Domain and email forwarding to new domain

Discussion in 'General' started by wpwood3, Mar 19, 2009.

  1. wpwood3

    wpwood3 New Member

    How can I forward all of my web and email traffic from an old domain to a new domain?

    For example:

    For web traffic:
    olddomain.tld/index.html > newdomain.tld/index.html
    olddomain.tld/folder1/index.php > newdomain.tld/folder1/index.php

    Domain forwarding at the registrar will forward web traffic but it doesn't seem to forward the email. We have external spam filtering for all incoming mail but I don't think that is the problem since the translation to "newdomain" would occur at the registrar prior to reaching the filter.

    For email traffic:
    [email protected] > [email protected]
    [email protected] > [email protected]

    I don't care if the forwarding is done at the registrar or my server but I do need all web traffic and email to be sent to the new domain.

    Any ideas?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just use the email forwarding function that is builtinto ispconfig or you add a postfix transport in the transports file manually.
     
  3. wpwood3

    wpwood3 New Member

    What about web traffic?

    If I forward the domain at the registrar then the email will never reach my server so ISPConfig will not be able to forward the email.

    If I do not forward the domain at the registrar and use ISPConfig to forward the email as you suggest, how can I forward the web traffic?
    Each web page on the old domain must forward to the same webpage on the new domain like this:
    olddomain.tld/index.html > newdomain.tld/index.html
    olddomain.tld/folder1/index.php > newdomain.tld/folder1/index.php
     
  4. falko

    falko Super Moderator Howtoforge Staff

  5. wpwood3

    wpwood3 New Member

    Is this correct?

    Thanks for your help.

    Let me make sure I understand exactly what you are saying by describing the steps I think I need to take. Maybe I'm making this too complex.

    1) At the registrar, point my newdomain to the nameservers on my server.

    2) In ISPConfig ISP Manager go to the ISP Site and change the Domain name of my olddomain to my newdomain. (This is easier than moving all of my content from web1 to web2)

    3) In ISPConfig ISP Manager create a new site with the olddomain name.

    4) In the web root directory of the site created in step#3 above create a .htaccess file to perform 301 redirects to the newdomain:

    5) In ISPConfig ISP Manager go to the site created in step#3 above and create all olddomain email accounts and forward then to the corresponding newdomain email accounts. (there are only about 15)

    Hopefully this will forward all of my web traffic and emails without hurting my Google search ranking too much. That's the main objective. I have read that doing the 301 at the registrar instead of the host may hurt search rankings.

    Is there an easier way?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    You don't need to create a new web site in ISPConfig. You can add newdomain.com and www.newdomain.com as Co-Domains to the olddomain.com web site and then add the correct rewrite rules so that olddomain.com is redirected to newdomain.com.
     
  7. wpwood3

    wpwood3 New Member

    Thanks falko.

    Instead of using .htaccess for the 301 redirect can I use "Apache Directives (Optional):" in ISPConfig?
    Maybe put something like this there:
    The 301 redirect is critical for SEO and it also makes sure the "www" is present in the URL.

    Since olddomain.com will be going away I think I will change the Domain of the site to newdomain.com and create co-domains for olddomain.com and www.olddomain.com. That way I can simply delete the co-domains in a year or so when I no longer need them. I think that will do the same thing as you suggest.
     
    Last edited: Mar 27, 2009
  8. falko

    falko Super Moderator Howtoforge Staff

    Yes, you can do that.
     

Share This Page