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
-
301 Redirects Showing As 307 Redirects
Hi, Our clients are adamant that they have set up 301 permanent redirects on their websites, but when we check using Screaming Frog and various online HTTP status code checkers they are showing as 307 temporary redirects. Examples;
Technical SEO | | Webpresence
http://www.lifestylelifts.co.uk/home-lifts/
http://www.terrylifts.co.uk/ Again, the client says they are seeing 301 redirects. Why are we seeing 307's? Who is right? Very puzzling, any theories would be very much appreciated 🙂 Thanks in advance. Lee.0 -
Recently migrated to https version of volusion site. 301 redirect link chain question
I recently migrated to a https version of a volusion site. They have some type of internal 301 redirect method to accommodate for the entire site. I have also used the 301 redirect manager to redirect categories and pages which I have changed. The question is if I have changed a page internally in the redirect manager from say source. /bluewidget to say. target. /superbluewidget is it wiser or even possible to do it this way to reduce the redirect chain from 3 to 2 steps source. /bluewidget to. target https://www.example/superbluewidget can a relative link be targeted to a full url to reduce steps in a 301 redirect link chain. Thanks
Technical SEO | | mrkingsley0 -
Best way to handle 301 redirects on a business directory
We work with quite a few sites that promote retail traders and feature a traders' directory with pages for each of the shops (around 500 listings in most cases). As retail strips, shops come and go all the time, so I get a lot of pages that are removed as the business is no longer present. Currently I've been doing 301 redirects to the home page of the directory if you try to access a deleted trader page, but this means a ever growing htaccess file with thousands of 301 redirects. Are we handling this the best way or is there a better way to tackle this situation?
Technical SEO | | Assemblo0 -
Site address change: new site isn't showing up in Google, old site is gone.
We just transitioned mccacompanies.com to confluentstrategies.com. The problem is that when I search for the old name, the old website doesn't come up anymore to redirect people to the new site. On the local card, Google has even taken off the website altogether. (I'm currently still trying to gain access to manage the business listing) When I search for confluent strategies, the website doesn't come up at all. But if I use the site: operator, it is in the index. Basically, my client has effectively disappeared off the face of the Google. (In doing other name changes, this has never happened to me before) What can I do?
Technical SEO | | MichaelGregory0 -
Redirecting old html site to new wordpress site
Hi I'm currently updating an old (8 years old) html site to wordpress and about a month ago I redirected some url's to the new site (which is in a directory) like this... Redirect 301 /article1.htm http://mysite.net/wordpress/article1/
Technical SEO | | briandee
Redirect 301 /article2.htm http://mysite.net/wordpress/article2/
Redirect 301 /article3.htm http://mysite.net/wordpress/article3/ Google has indexed these new url's and they are showing in search results. I'm almost finished the new version of site and it is currently in a directory /wordpress I intend to move all the files from the directory to the root so new url when this is done will be http://mysite.net/article1/ etc My question is - what to I do about the redirects which are in place - do I delete them and replace with something like this? Redirect 301 /wordpress/article1/ http://mysite.net/article1/
Redirect 301 /wordpress/article2/ http://mysite.net/article2/
Redirect 301 /wordpress/article3/ http://mysite.net/article3/ Appreciate any help with this0 -
Will sitemap generated in Yoast for a combined wordpress/magento site map entire site ?
Hi For an ecommerce site thats been developed via a combination of wordpress and magento and has yoast installed, will the sitemap (& other yoast features) map (& apply to) the entire site or just wordpress aspects ? In other words does one need to do anything else to have a full sitemap for a combined magento/wordpress site or will Yoast cover it all ? This link seems to suggest should be fine but seeing if anyone else encountered this and had problems or if straightforward ? http://fishpig.co.uk/wordpress-integration/docs/plugins.html cheers dan
Technical SEO | | Dan-Lawrence0 -
Migrating to New site keywords question
We are converting an old static html ecommerce site to a new platform. The old site has excellent ranking for some of the products. In order to maintain our ranking we will implement 301 redirects from old to new pages (as the urls will change to SEF). I am using Googles Keyword tool (in adwords) and entering each page url of the old site (there are hundreds, I'm doing the top 50 in traffic) and generating a set of keywords, then sorting each list by global searches. For each page, Google's Keyword Tool is giving me hundreds of keywords, but in meta tags there should be no more than 15, so I need a method to choose the keywords on the new page. Question: in the new meta tags should we emphasize the most common keywords (as defined by most global searches) or the least common keywords? I would hate to lose the good ranking for the least common (long tail) keywords.
Technical SEO | | ssaltman0 -
When Is It Good To Redirect Pages on Your Site to Another Page?
Suppose you have a page on your site that discusses a topic that is similar to another page but targets a different keyword phrase. The page has medium quality content, no inbound links, and the attracts little traffic. Should you 301 redirect the page to a stronger page?
Technical SEO | | ProjectLabs1