301 redirect via htaccess question
-
So, I have www.sitea.com and www.siteb.com
I want to redirect SOME pages from www.sitea.com to www.siteb.com (example: www.sitea.com/plugins/wp/ to www.siteb/wp/ etc ) and the rest of any pages left, to the homepage of www.siteb.com.
It is something with conditions... any help, please?
-
Yes I would do that, it's the best solution, redirect every corresponding page to the new one, and redirect the rest of the pages to the homepage / most relevant area. I can't see any issues with doing it this way.
404's won't transfer any of the weight over to the new site so would be a waste IMO.
-
@Ben,
There are around 150 pages that have a match on the new site (categories like Self Improvement, Science etc), I can redirect these like:
redirect 301 /category1/ http://www.newdomain.com/category1/
...
...
But, if I do this, the rest of the pages won't have a redirect (there are like 500 various indexed query pages that don't have a mirror on the new domain).
So, let's say I redirect what it has a corespondent on the new domain, I redirect the homepage, about us, contact etc.
But... what will happen with the urls that don't have a mirror?
I was thinking to redirect everything except the 1:1 correspondents to the new website's homepage... is that a wise idea? Or maybe a 404 custom page would be more indicated?
Thanks.
-
Have you tried using a .htaccess file to redirect individual URLs and then a sitewide one for the others?
If it doesn't let you do this at the same time, redirect the individual pages first, wait until the SEs have picked up on the redirect and then redirect the rest of the site. I would have thought you should be able to do both at the same time though.
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
-
Irrelevant backlinks - will 301 redirect cleanse the relationship?
My client has thousands of clients for whom they provided websites that used to reside in a subdirectory of their own domain. They moved them to their own domains but there are tens of thousands of backlinks on those sites pointing back to the original domain. Those backlinks are completely irrelevant and are probably hurting them by sending the wrong signals to Google on what this site really is about. My question is will the 301 redirect be enough to cleanse the relationship between my client and all their clients' sites or should I ask the client to clean up all those backlinks on their clients' sites and remove their domain from the target urls? That's a huge job, obviously.
Intermediate & Advanced SEO | | katandmouse0 -
Moving to a new domain name - 301 redirect NOT an option
Hi everyone My question concerns moving from an old to a new domain name without losing all previous SEO efforts. I am aware that a properly executed 301 redirect is the answer and way to go as well as telling Google about it in Webmaster Tools. However, what is the situation, if you do not own the old domain name anymore? If you have no means of getting back the old domain name and wanting to basically mask/switch the already existing website to the new domain name, will search engines penalise the "new site" as a duplicate, since the "old site" is still in the search engine rankings? I know that not being able to execute a proper 301 redirect and starting out with a new domain means a fresh start, but what is the best way to minimise the negative impact (if any)? Basically dropping the sites' current content and starting out new in favour of the new domain name is not really an option. Even if you were to take the content from the old site and place it on another site, this would surely be seen as duplicate too. Anyone thinks that Webmaster Tools/Google is savvy enough to spot the difference when the "old site" gets removed and the "new one" added instead (in Webmaster Tools). I read something along the lines about having your host point the DNS from the old site to the new one. Could something like be helpful? Thanks all in advance for your help and input!
Intermediate & Advanced SEO | | Hermski0 -
Order and multiple match when 301 redirect ?
Hi, I'm migrating a single domain to a multiple domain for each language, using apache redirections: Redirect 301 /partners http://www.itris-automation.com/
Intermediate & Advanced SEO | | 2MSens
Redirect 301 /partner-si http://www.itris-automation.com/system-integrators-partners
Redirect 301 /partner-institute http://www.itris-automation.com/institutional-partners
Redirect 301 /fr/ http://www.itris-automation.fr/
Redirect 301 /fr/support http://www.itris-automation.fr/support
Redirect 301 /privacy?lang=fr http://www.itris-automation.fr/politique-de-confidentialite Redirect 301 /de/plc-converter http://www.itris-automation.de/plc-converter
Redirect 301 /de/services http://www.itris-automation.de/
Redirect 301 /de/plc-quality http://www.itris-automation.de/sps-qualitat .... However it doesn't work properly: For example automationsquare.com/privacy?lang=fr redirect to http://www.itris-automation.com/privacy instead of http://www.itris-automation.fr/politique-de-confidentialite Does the order of the redirect has an influence? Am I missing something? I've seen that the command [L] can be useful to avoid mismatch? Thanks, Best, Benoit.0 -
301 Redirect of subdomain?
Fellow Mozzers, I'm having a hard time wrapping my brain around a redirect issue and thought it was worth posing the question to the Moz community. I did a search first but couldn't find the exact answer I was looking for. How does a 301 redirect work when you redirect a sub domain example.homepage.com to www.homepage.com but you keep the sub directories of example.homepage.com/page-1 active and are trying to rank them? I'm dealing with a current project where this is happening and this doesn't make sense to me, to redirect the subdomain if you're also trying to rank/create search traffic for pages, sub directories on example.homepage.com. This also get's into the debate of if a sub domain site is viewed as it's own website and therefore has to rank itself. If this is true, it seems like we're kind of killing the authority of the site by redirecting it. Additionally, www.homepage.com has a much stronger link profile than example.homepage.com I hope this makes sense. Any thoughts are appreciated. Thanks for your time.
Intermediate & Advanced SEO | | SMG-Texas0 -
Remove URLs that 301 Redirect from Google's Index
I'm working with a client who has 301 redirected thousands of URLs from their primary subdomain to a new subdomain (these are unimportant pages with regards to link equity). These URLs are still appearing in Google's results under the primary domain, rather than the new subdomain. This is problematic because it's creating an artificial index bloat issue. These URLs make up over 90% of the URLs indexed. My experience has been that URLs that have been 301 redirected are removed from the index over time and replaced by the new destination URL. But it has been several months, close to a year even, and they're still in the index. Any recommendations on how to speed up the process of removing the 301 redirected URLs from Google's index? Will Google, or any search engine for that matter, process a noindex meta tag if the URL's been redirected?
Intermediate & Advanced SEO | | trung.ngo0 -
How to decide on which site to 301 redirect
Hi there I'd like your opinions please! My client currently has their website at not-very-good-url.it which has a really good link profile they also have duplicate sites at: much-better-brand-name-url.it and much-better-brand-name-url.com but both these other sites have only a handful of links in. How important do you think a better brand url is? And therefore do you think it would be better to 301 to a better brand URL and take the risk that the link profile will get hit? Or leave the main site where it is and 301 the other two to it? Many thanks
Intermediate & Advanced SEO | | Chammy0 -
2-stage 301 redirects
Dear colleagues, I have quite an unusual situation with one of my client's websites, and I could use an advise from someone who experienced the same circumstances: They are currently planning on launching a new site under the same domain (by September), when several key current pages are intended to be replaced with new equivalent pages under new URLs. So far it's pretty simple, BUT - due to a merger with another company they will be migrating their entire website to a different domain within a year. My question is - what would be the optimal solution for redirects? We are considering a 301 from the current pages to the new pages under the same domain, and once the new domain is activated - aside from defining 301 redirects from the new pages under the same domain to the new domain, we will cancel the original 301 from the old pages to the new pages on the same domain, and instead define new 301 for those pages to the new domain. What do you think? Is there a better solution - like using 302 redirects for the first stage? Has anyone tried such a procedure? Your input will be highly appreciated! Thanks in advance, Omer
Intermediate & Advanced SEO | | Usearch0 -
301 a page and then remove the 301
I have a real estate website that has a city hub page. All the homes for sale within a city are linked to from this hub page. Certain small cities may have one home on the market for a month and then not have any homes on the market for months or years. I call them "Ghost Cities". This problem happens across many cities at any point in time. The resulting city hub pages are left with little to no content. We are throwing around the idea of 301 redirecting these "Ghost City" pages to a page higher up in the hierarchy (Think state or county) until we get new homes for sale in the city. At that point we would remove the 301. Any thoughts on this strategy? Is it bad to turn 301s on and off like that? Thanks!
Intermediate & Advanced SEO | | ChrisKolmar0