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
-
Old site selected as canonical on GSC 3 years after migration?
Recently my company started consulting for a SaaS company. They're clearly the best known, most trusted company on their area of work and they have the strongest brand, best product and therefore more users than any of their competitors by a big margin. Still, 99% of their traffic comes from branded, despite having 3x more domains, better performance scores and more content. Even using tools such as SimilarWeb for comparing user satisfaction metrics, they seem to have lower bounce rates and more visits per session. Still, they rank for almost nothing that is non branded on Google (they rank extremely well for almost everything on bing and DuckDuckGo). They don't have any obvious issues with crawling or indexation - we've gone to great depths to tick off any issues that could be affecting this. My conclusion is that it's either a penalty or a bug, but GSC is not flagging any manual actions. These are the things we've identified: All the content was moved from domain1.com to domain2.com at the end of 2017. 301s were put in place, migration was confirmed on GSC. Everything was done with great care and we couldn't identify any issues with it. Some subdomains of the site, especially support, rank extremely well for all sorts of keywords, even very competitive ones but the www subdomain ranks for almost nothing on Google. The www subdomain has 1,000s of domains pointing to it while the support has only a few 100s. Google is performing delayed rendering attempts on old pages, JS and CSS particularly versions of assets that were live before the migration in 2017, including the old homepage. Again, the redirects have been in place for 3 years. Search Console frequently showing old HTML (at least a year old) in cache despite a recent crawl date and a current 301. Search Console frequently processing old HTML (at least a year old) when reporting on schema. Search Console is sometimes selecting pages from the old domain as the canonical of a URL of an existing page of the current domain, despite a long-standing 301 and the canonicals being well configured for 3 years now. Has anyone experienced anything similar in the past? We've been doing an analysis of old SEO practices, link profile, disavow... nothing points to black hat practices and at this point we're wondering if it's just Google doing a terrible job with this particular domain.
Technical SEO | | oline1230 -
Redirects on multi language site and language detection
Hello! I have a multi language site in German and English. The site ranked well for the brand name and for German keywords. But after switching to a contend delivery network and changing the language detection method from browser language to IP location the site had indexing and ranking problems. Also in SERP the English homepage is shown for German keywords. On the other hand the language detection method is more accurate now. Current setup: The languages are separated via a folder structure for the languages: www.site.com/**en **and www.site.com/de. If the users IP is in Germany he is redirected via 302 from .com to .com/de. The rest of the world is redirected via 302 to .com/en. So the root www.site.com/ doesn't exist but has the most of the backlinks. Each folder has one sitemap under /de/sitemap.xml and /en/sitemap.xml. Each site and the root (.com, .com/de, .com/en) was added to WMT (no geo targeting) and the sitemaps were added (on the root domain both sitemaps and on the language specific sites just one). The sitemaps have no hreflang tag. Each page has an hreflang tag in the header pointing to itself and the alternate language. hreflang="x-default" is not set anywhere. Also on each page is a link to change language. Goals: From an SEO point of view we primarily target German speaking people. But a lot of international people (US, South America, Europe) search for our brand name so we want to serve them the English site. Therefore we want to: Get all the link juice when someone links to www.site.com to the German site Show Germans the German site in SERP and all others the English one Still serve the language automatically based on the location Do you have any idea how to achieve this? I think our main problem is that we want to push the German site the most but still serve the English site for most people (and therefore the Google Bot). Also does submitting the same sitemap twice (on the domain site and folders) do any harm? Any help oder links to ressources are greatly appreciated. I read a ton of articles but they are mostly for the case that english is the default language. Thanks for you help Moz community! Alex
Technical SEO | | AlexBLN1 -
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 -
Should we 301 redirect our old domain to the new domain
We have a product that when started was under the domain appnowgo.com. We've since changed the name and the domain is now knackhq.com. The latter domain doesn't rank nearly as well as the former for many of the keywords we are targeting. For example... "online database builder" and "web app builder" are two of those keywords. Obviously having app in the domain is not a bad thing but it is our old name. The question is, should we 301 the appnowgo.com domain to knackhq.com? Or should we use that better rank and just link users to knackhq.com from the appnowgo.com site until we can increase our ranking for knackhq.com? We don't plan to update the content on appnowgo.com anymore and we obviously don't want to drop off rank if at all possible. Thanks! Eric
Technical SEO | | sitestrux0 -
Best strategy for redirecting domain authority from an acquired site...?
Hi all, I'm an in-house for a company that made several acquisitions last year prior to my starting. I'm just now hearing about several loose-ends websites that belong to companies that have been absorbed by us. The question is how to best approach the task of utilizing that site's domain authority to our site's benefit. There is already a link to the homepage in the header of the site in question (our logo's right under theirs) so we're already getting some linkjuice. Looks like the whois information never changed. Here are the options I'm considering: 1. Blanket redirect (all of their pages there into our home page) - not ideal. 2. Targeted redirect (try to "connect the dots" between content pages with similar subjects/keyword relevance - better than #1, but is it worth the extra effort? 3. More linking (add more strategically placed and keyword optimized links back to our site) - also more work, but certainly do-able if the consensus is to leave the site up. 4. Any other suggestions? Thanks for your help everyone!
Technical SEO | | TGViaWest0 -
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 -
Old proudct pages - eComm Site
Hello, Geeks.com currently has approx. 194k pages in Google index. (approx. 30k suppl.) http://www.google.com/search?q=site%3Ageeks.com+inurl%3Aadditem&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#sclient=psy&hl=en&client=firefox-a&hs=Ltp&rls=org.mozilla:en-US%3Aofficial&source=hp&q=site:www.geeks.com%2F&aq=f&aqi=&aql=&oq=&pbx=1&fp=876898a2ea0c82c7&biw=1512&bih=641 We have many thousands of old product urls which have gone out of stock, never to "see the light of day" again. 14 years worth! Should we be 301'ing all old products pages that go out of stock, if we know for certain we will never carry that SKU again? If we were to do a "mass" 301 of 30k+ urls how would google or other SE's react to that? Could there be any negative implications to doing so? What is considered best practice for eComm sites, as I imagine we are not alone with this type of situation. Thank you in advance. Michael B.
Technical SEO | | JustinGeeks0 -
Best cross linking strategy for micro sites?
Hi Guys. I created a micro site (A design showcase gallery) away from the main website to attract a lot of links in my space from competitors. It works so well it has become a valuable resource in my industry and I believe I will keep it running and adding content to it. Is the best SEO strategy for the main site simply to link from each page to the main site? Or should I be looking at something else? Thanks, Alan
Technical SEO | | spoiltchild0