Redirect from old wordpress site to new php site? Best approach
-
Hi
I have two websites one legacy site done in wordpress the other in php. However I would like to merge the two together and remove the wordpress site.
However it has a good link profile and the pages rank well.
What is the best approach to do a 301 redirect from the old site with all its pages pointing to the homepage of the new site?
If so what's the best way to do this in wordpress?
Many thanks
-
Ian
- Meta refreshes should never be replaced with 301's, they are actual much worse than a 302 redirect.
- There are a few redirects you can find - http://www.aowaa.com/5-wordpress-301-redirect-plugin/ and http://wordpress.org/extend/plugins/simple-301-redirects/. The disadvantage I find with using plugins is that they extremely slow down your site.
- For doing 301 redirects it's entirely up to the server your site is hosted on.
-
Basically because there were too sites in tandem and when the business areas merged there is only a need for one site.
I am struggling with the best way to achieve this as described in my post at the bottom of this thread
-
Can this be done?
on each page indexed?
Are there not any Wordpress plugins that would do this without delving into the htaccess file?
In your example you mention the code below, how would I change what I have below to redirect from my mydomain.co.uk site to point at the correct site mydomain.com site
And on the redirect 301 lines, how would I redirect - what would the code need to be?
www.mydomain.co.uk/sample to www.mydomain.com/newsamplepage.php
-
Hi Ian,
Edward has started on the right step in terms
Ian I wouldn't say cms is too important as hosting and server details, because hosting & server is what limits your ability to migrate the website.
Check out this recent article - http://www.seomoz.org/blog/web-site-migration-guide-tips-for-seos and go to the URL mapping section to get a comprehensive step by step guide. Focus on your best pages.
Naghirniac, rather than searching pages indexed by google, it would be better to use a site crawler like Xenu or screaming frog as it will find all duplicate and 404 pages for you.
Good luck,
V
-
Ian,
You will need to do the follow:
1) Search pages indexed by google
You will need to do the 301 redirection only for the pages that google already indexed. To discovery then you need to google "site:www.example.com", where example.com is your website
2) Create the .htaccess file
Inside of the .htaccess file you will need to include:
RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L]
redirect 301 /old.html http://www.example.com/new.html
The first part is to avoid duplicated content from www.example.com and example.com. The line redirect 301 you will need to write for each page you need a redirection (founded at step 1). That's all.
-
redirect the pages in the .htaccess file.
rather than redirect them all to the homepage, you should redirect them to the most relevant page on the other site.
why are you getting rid of one site?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Is 301 redirects a deal breaker for Migrating content or moving to new software?
I have this forum with about 2 million posts for 16 years on root of the domain. I am looking to switch softwares but the top ones won’t help setup 301 redirects. But I can still migrate all my members and all my content (threads/posts), would Google still reindex all our content or if we don’t setup redirects would it really kill our entire traffic for a long time or maybe just a month or so? I really want to migrate to software that isn’t forum based but rather something that offers courses, chat, live video streaming, subscription based etc. and this is the only way to do so OR to set it up on an entirely new domain OR subdomain but to me that is like starting all over from scratch? I could archive the forum to read only and set it up on subdomain or another root domain - then on the archived forum setup banners and a pop up linking to the new site or new subdomain? . This is such a hard decision for us as the current forum we have had for so many years has lost members posting from 1k a day to just a handful a day, our fb group though gets 1k a day so I’m trying to revive a site into something more modern and has all the training features we can offer as well.
Technical SEO | | vbsk1 -
Old site name showing in SERPs
Hi all, We've recently re-launched one of our sites with a substantial redesign, refreshed content, meta data, descriptions and functionality. We noticed in SERPs that some of the page titles are showing the old name for the site, which hasn't been used for a few years and the site's been through a few updates and a URL change since then. All the meta titles showing up as they should in crawls through Search Console and Moz and it's my understanding that if Google were pulling a cached version of a title it would have gone for a more recently cached one? Any thoughts on why Google's turned back the clock on our site's name would be greatly appreciated! -Jamie
Technical SEO | | JamieCMF0 -
Newbie: .co.uk site redirecting to .com.
If I run a Moz report on the .co.uk site I get a domain authority reading but if I do the same on the .com site there is no authority. How do I get authority passed to the .com (the domain name is the same in both cases)
Technical SEO | | timgtheo0 -
Moving to old site to new domain sub directory
Hi, we've moved our old site to a new domain but in a subdirectory (the shopping site has been consolidated into overarching company website's shopping section, thus the move to sub dir). Are 301 redirects from old URLs to new domain's subdirectory ex newsite.com/shopping/page-1/ sufficient for site migration? I wasn't able to use Google's site address change tool since we're moving to a subdirectory on the new domain. Thanks
Technical SEO | | SoulSurfer80 -
Wordpress and Redirects?
I want to update my permalinks - actually I want to change the URL's to fit the content and keywords better. I can choose "edit" the URL, but don't I need a redirect? I don't see any htaccess Plugin installed.......is that what I need to be able to change my URL's in Wordpress?
Technical SEO | | cschwartzel0 -
Is a canonical tag the best solution for multiple search listing pages in a site?
I have a site where dozens of page listings are showing in my report with a parameter showing the page number for the listings. Is the best solution to canonical these page listings back a core page (all-products)? Or, do I change my site configuration in Webmasters to ignore "page" parameters? What's the solution? Example URL 1- http://mydomain.com/products/all-products?page=84 Example URL 2- http://mydomain.com/products/all-products?page=85 Example URL 3- http://mydomain.com/products/all-products?page=86 Thanks in advance for your direction.
Technical SEO | | JoshKimber0 -
I have a WordPress site with 30 + categories and about 2k tags. I'd like to bring that number down for each taxonomy. What is the proper practice to do that?
I want to bring my categories down to about 8 or so and the tags... They're just a mess and I'd really like to bring that figure down significantly and setup a standard for usage. My thought was to remove the un-needed tags and categories and setup 301 redirects for the ones that I'm removing. Is that even necessary? Are there tools that can assist with this? What are the "gotchas" I should be aware of? Thanks!
Technical SEO | | digisavvy1 -
Old owners links pointing to new owners domain
We have a number of web sites. We recently acquired an excellent domain name, it happened to be owned by one of our competitors. Our competitor has a lot of web sites, each domain having a basic 5 page unoptimized site with one of those pages little more than a link farm. They have over three hundred domains with all but lets say 10 of them consisting of basic 5 page sites with a link "directory" on one of those pages. - the directory page is the same on every single site/domain. One of the links from that directory is going to our newly acquired domain and newly optimized web site. Being new to this, should this pose any kind of concern for us? Thanks in advance!
Technical SEO | | PlasticCards0