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
-
Where to put 301 redirects in my Wordpress htaccess file?
I have about 25 301 redirects in my Wordpress htaccess file, that look like this: <code>Redirect301/store/index.html https://www.notesinspanish.com/store-home/</code> At the moment they are at the bottom of my htaccess file, below the usual Wordpress rewrite rules: <code># BEGIN WordPress <ifmodulemod_rewrite.c>RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress</ifmodulemod_rewrite.c></code> So they are below all that. Above my WP rewrite rules I have a number of other rules from plugins (caching, ssl). Are my 301's OK where they are at the very bottom of that file? They are working, and redircting pages correctly. Should they be somewhere else? Many thanks for any help. Thanks for any help.
Technical SEO | | Benspain0 -
Should I set 301 Redirects or keep old permalinks?
I just built a new site for a client and the new site has pretty links like domain.com/about-us. The old site has been around for a VERY long time and had links like domain.com/aboutus. I want to do 301 redirects because from my understanding, it minimizes the negative SEO impact. But the client wants to keep the permalinks without the hyphens to match the old links. What is the best route, considering SEO? BTW, the site is still on the same domain. Thanks in advance for your help! Neik
Technical SEO | | glassh0use0 -
Can I redirect a link even if the link is still on the site
Hi Folks, I've got a client who has a duplicate content because they actually create duplicate content and store the same piece of content in 2 different places. When they generate this duplicate content, it creates a 2nd link on the site going to the duplicate content. Now they want the 2nd link to always redirect to the first link, but for architecture reasons, they can't remove the 2nd link from the site navigation. We can't use rel-canonical because they don't want visitors going to that 2nd page. Here is my question: Are there any adverse SEO implications to maintaining a link on a site that always redirects to a different page? I've already gone down the road of "don't deliberately create duplicate content" with the client. They've heard me, but won't change. So, what are your thoughts? Thanks!
Technical SEO | | Rock330 -
Bigcommerce only allows us to have https for our store only, not the other pages on our site, so we have a mix of https and http, how is this hurting us and what's the best way to fix?
So we aren't interested in paying a thousand dollars a month just to have https when we feel it's the only selling point of that package, so we have https for our store and the rest of the site blogs and all are http. I'm wondering if this would count as duplicate content or give us some other unforeseen penalty due to the half way approach of https being implemented. If this is hurting us, what would you recommend as a solution?
Technical SEO | | Deacyde0 -
How to redirect 302 status to 301 status code using wordpress
I just ran the link opportunity option within site explorer and it shows that 31 pages are currently in a 302 status. Should I try to convert the 302's to 301's? And what is the easiest way to do this? I see several wordpress plugins that claim to do 301 redirects but I don't know which to choose. Any help would be greatly appreciated!
Technical SEO | | vmsolu0 -
How do you handle Wordpress sitemaps within your site?
I have a regular site map on my site and I also have a Wordpress site installed within it that we use for blog/news content. I currently have an auto-sitemap generator installed in Wordpress which automatically updates the sitemap and submits it to the search engines each time the blog is updated. The question I have (which I think I know the answer to but I just want to confirm) is do I have to include all of the articles within the blog in the main site's sitemap despite the Wordpress sitemap having them in there already? If I do include the articles in the main website's sitemap, they would also be in the Wordpress sitemap as well, which is redundant. Redundancy is not good, so I just want to make sure.
Technical SEO | | iresqkeith0 -
Changed cms - google indexes old and new pages
Hello again, after posting below problem I have received this answer and changed sitemap name Still I receive many duplicate titles and metas as google still compares old urls to new ones and sees duplicate title and description.... we have redirectged all pages properly we have change sitemap name and new sitemap is listed in webmastertools - old sitemap includes ONLY new sitemap files.... When you deleted the old sitemap and created a new one, did you use the same sitemap xml filename? They will still try to crawl old URLs that were in your previous sitemap (even if they aren't listed in the new one) until they receive a 404 response from the original sitemap. If anone can give me an idea why after 3 month google still lists the old urls I'd be more than happy thanks a lot Hello, We have changed cms for our multiple language website and redirected all odl URl's properly to new cms which is working just fine.
Technical SEO | | Tit
Right after the first crawl almost 4 weeks ago we saw in google webmaster tool and SEO MOZ that google indexes for almost every singlepage the old URL as well and the new one and sends us for this duplicate metatags.
We deleted the old sitemap and uploaded the new and thought that google then will not index the old URL's anymore. But we still see a huge amount of duplicate metatags. Does anyone know what else we can do, so google doe snot index the old url's anymore but only the new ones? Thanks so much Michelle0 -
Will changing page extensions from .html to .php require a redirect?
Hi. We are launching a new website and our .html page extensions will be replaced with a .php page extension. Example: www.theideapeople.com/web_design.html (current url) www.theideapeople.com/web_design.php (new url) Will this require any special treatment to maintain the page SEO ranking? Does it make a difference if you use a .html or .php? Thank you for your help and insight! Jay
Technical SEO | | theideapeople0