301 redirect help
-
Hey guys, I normally work in WordPress and just use a 301 redirect plugin. I bought a site and rather than maintain two similar ones have decided to redirect one to the other.
I am having trouble with the .htaccess file. Here is an example. These are two redirects:
redirect 301 /category/models/next/2
redirect 301 /category/modelsI want both of these URLs to redirect to the same URL of the new site. However, the /category/models is the only one working. It redirects to the new page just fine. The /category/models/next/2 is redirecting to nearly the same URL on the new site, only it is adding /next/2 to the end and that is bringing up a 404.
Why is it adding /next/2 to the new URL? How can I fix this? There are several doing this. Help appreciated!
-
Hi,
I just did this and had similar issues
It looks like the .htaccess is correct at the old domain.
but you need to put in re-directors at the new domain that will take in these extra items due to these directories do not exist at the new domain.
There could be an easier way, without putting a redirect after a redirect (which possibly losses a little extra juice) but I am not aware of a way without redirecting all 404 queries.
after you have put back the 301 that was working at the OLD domain In the .htaccess at the NEW domain you would put
Redirect /category/models/next/2 http://www.example.com/
This will tell any queries for http://www.example.com/category/models/next/2
to redirect to http://www.example.com or whatever you put in....
hope this helps!
-
Didn't seem to fix it. None of the redirects worked anymore. They all just changed the domain name, not redirect to the specified URL.
-
Try changing the last line to:
RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L]
-
This is at the top of the .htaccess file:
rewritecond %{HTTP_HOST} ^www.old-domain.com$ [OR]
rewritecond %{HTTP_HOST} ^old-domain.com$
rewriterule ^$ "http://new-domain.com/" [R=301,L]Does this need to be changed?
-
Whats in your .htaccess file at the moment?
I think in your .htaccess your redirect should be setup something along the lines of:
RewriteCond %{HTTP_HOST} ^www.old-domain.com$ [NC]
RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L]
Someone else could probably make that a bit neater but something like this should work.
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
-
Soft 404 error for a big, longstanding 301-redirected page
Hi everyone, Years ago, we acquired a website that had essentially 2 prominent homepages - one was like example.com and the other like example.com/htm... They served the same purpose basically, and were both very powerful, like PR7 and often had double listings for important search phrases in Google. Both pages had amassed considerable powerful links to them. About 4 years ago, we decided to 301 redirect the example.com/htm page to our homepage to clean up the user experience on our site and also, we hoped, to make one even stronger page in serps, rather than two less strong pages. Suddenly, in the past couple weeks, this example.com/htm 301-ed page started appearing in our Google Search Console as a soft 404 error. We've never had a soft 404 error before now. I tried marking this as resolved, to see if the error would return or if it was just some kind of temporary blip. The error did return. So my questions are:
Intermediate & Advanced SEO | | Eric_R
1. Why would this be happening after all this time?
2. Is this soft 404 error a signal from Google that we are no longer getting any benefit from link juice funneled to our existing homepage through the example.com/htm 301 redirect? The example.com/htm page still has considerable (albeit old) links pointing to it across the web. We're trying to make sense of this soft 404 observation and any insight would be greatly appreciated. Thanks!
Eric0 -
Is a 301 Redirect and a Canonical Tag on Uppercase to Lowercase Pages Correct?
We have a medium size site that lost more than 50% of its traffic in July 2013 just before the Panda rollout. After working with a SEO agency, we were advised to clean up various items, one of them being that the 10k+ urls were all mixed case (i.e. www.example.com/Blue-Widget). A 301 redirect was set up thereafter forcing all these urls to go to a lowercase version (i.e. www.example.com/blue-widget). In addition, there was a canonical tag placed on all of these pages in case any parameters or other characters were incorporated into a url. I thought this was a good set up, but when running a SEO audit through a third party tool, it shows me the massive amount of 301 redirects. And, now I wonder if there should only be a canonical without the redirect or if its okay to have tens of thousands 301 redirects on the site. We have not recovered yet from the traffic loss yet and we are wondering if its really more of a technical problem than a Google penalty. Guidance and advise from those experienced in the industry is appreciated.
Intermediate & Advanced SEO | | ABK7170 -
301 Redirecting Multiple Domains
I have several complete websites with blogs setup for different geo locations and was considering forwarding them all to one domain directly would greatly benefit ranking. The blogs are all linked together and that is where most of the links come from. Would I benefit in 301 Redirecting the domains?
Intermediate & Advanced SEO | | WindshieldGuy-2762210 -
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 -
301 redirect hell.... How do you de-commission an old site
Hi SEO experts: We operate a vacation rental website and around 1 year ago moved to a different platform. Because our pages are arranged by location (what we refer to as Locales) we need to put 301 redirects for all the old locale pages. So for example: www.example.com/__Skeggness.cfm redirects to www.example/com/vacation-rentals/locale/skeggness But here's the problem: We can't seem to get Google to drop those old __{locale_name}.cfm pages... even after over 12-months of the new site going live! Other clues we've noticed: The old underscore URLs show up in our SERP sub-links Sometimes google shows the new page title and description but attributes it to the __{locale_name}.cfm URL (aghh!!!) One suggestion we received was to use the URL removal tool in Google WMT.... But given we have 1,000's of locales i don't see that as being affective. Questions: Any suggestions on how to get Google to drop these old URLs and use the new ones? Is this situation hurting our SEO? Or do you think its benign... and I should just take a deep breath.... and relax at little more...
Intermediate & Advanced SEO | | AABAB0 -
Is 301 redirect suggested on pagination pages
Hi - Due to pagination the default page of site is coming in 2 url with - ?page=1/ sub-url and /sub-url is 301 a recommended solution due to this pagination urls Also - is it required to create separate title and meta description of every pagination page We are taking specifically in context of our discounts and offer section http://www.mycarhelpline.com/index.php?option=com_offers&view=list&Itemid=9
Intermediate & Advanced SEO | | Modi0 -
Can some brilliant mozzer out there teach a moron/newbie like me how to 301 redirect several URL's I have?
Okay - I am a supermodel. I look pretty. My legs are amazing. My cheekbones are high. But when it comes to 301 redirects I am the ugliest supermodel on the block. Crap, here is the truth: I am not even a supermodel. I am just a middle-aged, goofy looking dude who is a newbie to fixing websites. I have inherited several sites from a friend and I have been helping by creating solid contextual links internally and externally for a while. But, when Roger the wondrous SEOMoz robot talks to me, he says, "oops, it looks like your foolish freak self has a site that has both a www. and a non-www, which can create competition for yourself." What do I do when he says that? I just whisper a "thank-you" but gently press the skip this step button and go on with my life because I do not know how to make my non-www.'s redirect into the www. sites... Now, I have sort of asked this question on the site before, but I was answered by someone who does not understand my level of ignorance. any use of the word canonical or just put this lfwjkshj.htp/php inside the left ear of your mom, does not tell me anything so, is there any willing and kind soul who can walk me through redirecting several of my sites to their proper home - kind of like Carl Chubbs Weathers did for Happy Gilmore in that Academy Award winning classic? Thanks for the help in advance best, dumbhead
Intermediate & Advanced SEO | | creativeguy0 -
Anchor text help
Hello, I am a small website designer in Mexico.. as you know it is hard to rank in these keywords My main competitors appear with (diseño web = web design) on google.com.mx Almost 80% of the anchor text from my links are (diseño web Mexico =web design Mexico) If I search (diseño web Mexico =web design) on google.com.mx I appear on first page. If I search (diseño web = web design) on google.com.mx I appear on page 3. My questions: Is this because my anchor text is diseño web Mexico? should i change it to (diseño web = web design)? Or is it because (diseño web = web design) is a harder key word to rank? this is my website http://bit.ly/eKyWvr Regards
Intermediate & Advanced SEO | | Pixelar0