Redirect Posts to New Domain

Community Forums Forums General Discussion Redirect Posts to New Domain

This topic is: not resolved

This topic contains 11 replies, has 5 voices, and was last updated by  Bill Murray 1 year, 3 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #34816

    tpaulwhite
    Participant
    Post count: 23

    Hi – I was in the process of moving my domain from travelfreefaster.com to milepro.com.   Both sites were using the Studiopress News theme.  I had moved some of the content over, then had to upgrade my database of travelfreefaster.com to sql5 (it was on SQL4 and my hosting provider told me I had to upgrade now).  In doing so, something got screwed up and the database was overwritten.  Big Lesson….  I did not back up my database so just about everything from travelfreefaster (“TFF”) is gone.

    I have redirected the top level domain so that any former TFF page or post goes to the milepro.com home page.

    Is there way to redirect individual posts from TFF to the similar milepro post?  While I don’t have the old TFF post information I do still have the links.  I am hoping to at least pass some of the SEO juice from TFF to Milepro.  Is there anyway to do this within Studiopress?

    Thank you….

    PS…  I know this was a huge bonehead move and I now have the proper database backup in place on Milepro…. :(

    #34831

    anitac
    Participant
    Post count: 7027

    By any chance did you export the XML file out of the original TFF? If you still have TFF, all you need to do is go Tools > Export. Export everything. Then go over to MilePro – go to Tools > Import and import everything and you are done.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #34840

    Bill Murray
    Participant
    Post count: 572

    If the links from 1 site to the next are EXACTLY the same, you might be able to use a regex (regular expression) in an .htaccess file on the host of the old domain. You can’t redirect the old domain to the new domain FROM the new domain (because if you could you could forward another site that you don’t own to your site). If you don’t want to keep the old domain hosted (which would allow you to redirect from it), you won’t be able to do much if anything.

    Your host also likely has backups that can restore your database.

    Your best bet is to contact to your host and see what resources are available to you.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #35043

    tpaulwhite
    Participant
    Post count: 23

    Thank you for the reply.

    I have tried to get backups multiple times from my provider but they are all old versions (i.e. from 2010) – I was very disappointed with how poorly the back up process worked at this provider.

    I have to assume the any recent version of the database is gone – I have a version that is 2 years old, with some of the posts, just not any from the last 2 years.    I also have all of the links to the posts both new and old.

    Is there a plugin or some other tool where I can put all of the links from the old site and redirect them to the corresponding page on the new site?

    #35044

    Summer
    Participant
    Post count: 955

    In the past, when moving posts from one site to another, I’ve used this plugin: http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

    Eliminates the need to maintain a few hundred links in your .htaccess (something I once had to do long long ago)


    #35045

    Bill Murray
    Participant
    Post count: 572

    You can do that in .htaccess FROM the old site.

    You can’t use a plugin or update the .htaccess on the new site and redirect links from the old site to the new site.

    You have to plan on keeping the server at the old site active long enough for any links to get updated to the new site. Search engines will update over time. Then, you’d reach out to others who used a manual backlink and ask them to update it. Unless someone manually updates those backlinks, once you close the old server account, those links will return a 404.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #35074

    tpaulwhite
    Participant
    Post count: 23

    I am sorry – Do you think I should use the plugin or modify the htacess file?   I will keep the old site live

    I probably have about 40 pages/posts I want to redirect

    for example:

    http://www.travelfreefaster.com/promotions-miles-points/airline/delta-promotions-coupons-discount-codes

    redirect to:

    http://www.milepro.com/travel-coupons/airline-offers/delta-airlines-skymile-promotions-deals/

    If I used the htaccess file, how would you suggest I do this?  Can you please show me what I would do?

    I really appreciate it!

    #35081

    Bill Murray
    Participant
    Post count: 572

    For 40 redirects that aren’t likely to change, the difference between the plugin and setting up the redirects in an .htaccess file is minimal. .htaccess redirects are faster, but they are harder to maintain because they require manual editing. For the less technically inclined, the plugin is probably an easier route. I haven’t used the particular plugin that another posted linked here, so I can’t say more than that.

    For .htaccess redirects, you’d have to work with your host or have a basic idea of web server setup to create them up. The concept is that you’d edit the .htaccess in the root of your web site (the old one) and include something like this for each of the 40 URL’s you want to redirect:

    redirect 301 /promotions-miles-points/airline/delta-promotions-coupons-discount-codes http://www.milepro.com/travel-coupons/airline-offers/delta-airlines-skymile-promotions-deals/

    Each redirect would be on its own line. You likely already have an .htaccess file in the root of the old site put there by WP, so you’d have to edit that file. You’d also want to include a redirect for the root of the old site. Keep in mind these redirects will only redirect exact matches, so if someone mis-types a URL on the old domain, it will trigger the old domain’s 404. You can get more sophisticated with regex in an .htaccess file, but that might be more than you need for redirecting a small site.

    My recommendation is to try the plugin, since that will be easier to configure. You’d install that on the old site. If that doesn’t work out, you might need to hire someone to setup your redirects.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #35182

    Summer
    Participant
    Post count: 955

    Confirming what Bill says, yes, you must do all the redirects from the old site to the new one… can’t work the other way around, and if your old domain is going to remain online and not go away, all the better.

    If editing the .htaccess makes you a bit skittish, try the plugin.  I was using my own frame of reference from comparisons between having used the plugin on several sites, and having had to create a .htaccess file a few years back to redirect over 350 URLs from a hand-rolled HTML site originally created in 1998 to not just its own new WordPress edition but also a several other sites where some of the content had been split off to.

    N I G H T M A R E, and I had no one to blame but myself since it was one of my own pet project websites.  These days, it’s running a custom mod of Backcountry, in fact  :)


    #35476

    Gary Jones
    Moderator
    Post count: 686

    To expand further on all of the correct advice above, if none of the posts have changed corresponding category / sub-category, then that’s when regex’s would be useful. For instance, if all of the posts from promotions-miles-points -> airline are now in travel-coupons -> airline-offers, then you could do something like:

    RewriteRule ^promotions-miles-points/airline/(.*) http://www.milepro.com/travel-coupons/airline-offers/$1 [R=301,L]

    and not have to target each of the individual posts.

    The advantage of doing the redirect in .htaccess, is that it should happen quicker – no need for PHP and a whole WordPress bootstrap to be included and parsed, just to be able to let the plugin jump in and send you off site anyway. That in turn means you don’t have to leave an install of WordPress present along with a database – the domain could point to a free / very cheap bit of hosting (sometimes provided by the domain name registrar) that just needs support for .htaccess.


    Changes in Genesis 2.1 – the ultimate guide to every single change in Genesis Framework 2.1 and 2.1.1 (all 88 of them!) | @GaryJ

    #35729

    tpaulwhite
    Participant
    Post count: 23

    Hi Everyone – thank you for your help – I really appreciate it.

    I made a lot of progress with the plugin – the only thing I can’t get it to redirect is my toplevel domain.

    I can get most of the posts to redirect, but can’t get http://www.travelfreefaster.com to migrate to http://www.milepro.com? When I did a forward of the address from my web host, it would just forward any page or post from travelfreefaster.com to the home page of milepro.com – I didn’t want that.

    Can you think of a way I can still have the individual posts forwarding to the new posts, as they are in the plugin, but also have the old home page forward to the new homepage?

    I really appreciate your help!

    #35733

    Bill Murray
    Participant
    Post count: 572

    To clarify, you tried to do a redirect of the travelfreefaster homepage using the plugin and it didn’t work? I’ve never used that plugin, but from the description, it should work. You might try adding a / to the end of the homepage link, so it is http://www.travelfreefaster.com/ and be sure to eliminate the ? at the end of the milepro link (at least that’s that you included in your link).

    If that doesn’t work, you might try making a post in the support forum for that plugin at the WP.org plugin repo. @Summer might be able to add more based on experience using the plugin.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.