Need some help with a tricky 301
-
I can't find anything online that deals with this issue. I have a page getting indexed by Google at mydomain.com/widgets and I don't know why. No links to it anywhere. The page it is closest to is mydomain.com/reviews/widgets and so I tried to set up a 301 to point one to the other.
The problem is each individual widget review is at mydomain.com/widgets/reviews/products/widget-name and so when I redirect /widgets to mydomain.com/reviews/widgets it also redirects each individual product to mydomain.com/reviews/widgets/reviews/products/widget-name.
Is there some way to just redirect /widgets without having it affect each product review? I cannot change URL structure either, nature of the site. Any ideas?
-
Hi Daniel,
Whenever I hear "Nothing is redirecting when I add this to the .htaccess file" I have one thought:
Is the site using Joomla, Drupal or some other CMS that will overwrite .htaccess rules externally?
Sha
-
Just not happening. I'm just not going to worry about it, thanks for your help
-
Gotcha. Try adding the rewriteengine on line directly above those two rules. That has to be present to trigger the mod_rewrite module. Hopefully that will solve the issue.
-
Yeah I took the ReweriteEngine On line out and just added the RewriteRule line in underneat that one. Although it doesn't say anywhere RewriteEngine On in the .htaccess file already, so not sure how that works.
-
Well, that's no fun. If there is already a line to initiate the rewrite engine, that 2nd 'rewriteengine on' reference could be a problem. I assume you took that out?
-
It is not working for me. Nothing is redirecting when I add this to the .htaccess file. First I added it as you suggested at the bottom of everything. Nothing happened so I added right after another line of code that was already in there that started with RewriteRule. This is the line that was already there:
RewriteRule ^.*$ index.php [NC,L]
Any idea what could be going wrong? Thanks in advance!
-
Hi Daniel - Are you using htaccess to handle your redirects. I think you'll need to employ some Regular Expressions to handle what you're trying to accomplish. As a guide, here is a very nice writeup on RegEx from - where else - SEOmoz: http://www.seomoz.org/blog/an-seos-guide-to-regex
so, in this case, i think what you'll want is:
RewriteEngine On
**RewriteRule ^widgets/?$ reviews/widgets [NC]**so, the caret (^) ensures that the url starts with widgets, while the dollar sign ensures that the redirect rule stops there (eliminating that pesky problem you encountered with the review pages also getting redirected). The ? just means that the trailing slash is optional.Hope that helps. If this solution isn't feasible, you could always hedge with rel="canonical" on the mydomain.com/widgets page and have that point to the proper page. That will at least help with Google.-Jason
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
-
IP Canonicalization - Is this needed?
Hi Wondering if we need to worry about IP Canonicalization via htaccess and if this is really required? and does would it have a big impact?
Intermediate & Advanced SEO | | Cocoonfxmedia0 -
Google Seeing 301 as 404
Hi all, We recently migrated a few small sites into one larger site and generally we had no problems. We read a lot of blogs before hand, 301'd the old links etc and we've been keeping an eye on any 404s. What we have found is that Webmaster is picking up quite a few 404s, yet when we investigate these 404s they are 301'd and work fine. This isn't for every url, but Google is finding more and I just want to catch any problems before they get out of hand. Is there any reason why Google would count a 301 as a 404? Thanks!
Intermediate & Advanced SEO | | HB170 -
Please help with creation of slideshare
Just wondering how I would go about creating something like this http://www.slideshare.net/coolstuff/the-brand-gap?from_search=1
Intermediate & Advanced SEO | | BobAnderson0 -
How to 301 redirect old wordpress category?
Hi All, In order to avoid duplication errors we've decided to redirect old categories (merge some categories).
Intermediate & Advanced SEO | | BeytzNet
In the past we have been very generous with the number of categories we assigned each post. One category needs to be redirected back to blog home (removed completely) while a couple others should be merged. Afterwords we will re-categorize some of the old posts. What is the proper way to do so?
We are not technical, Is there a plugin that can assist? Thanks0 -
Urgent Site Migration Help: 301 redirect from legacy to new if legacy pages are NOT indexed but have links and domain/page authority of 50+?
Sorry for the long title, but that's the whole question. Notes: New site is on same domain but URLs will change because URL structure was horrible Old site has awful SEO. Like real bad. Canonical tags point to dev. subdomain (which is still accessible and has robots.txt, so the end result is old site IS NOT INDEXED by Google) Old site has links and domain/page authority north of 50. I suspect some shady links but there have to be good links as well My guess is that since that are likely incoming links that are legitimate, I should still attempt to use 301s to the versions of the pages on the new site (note: the content on the new site will be different, but in general it'll be about the same thing as the old page, just much improved and more relevant). So yeah, I guess that's it. Even thought the old site's pages are not indexed, if the new site is set up properly, the 301s won't pass along the 'non-indexed' status, correct? Thanks in advance for any quick answers!
Intermediate & Advanced SEO | | JDMcNamara0 -
Redirect help
I work for a company that has a domain that is something like www.neat-stuff.com but most people just use www.neatstuff.com without the dash. The redirect for the homepage works fine. We recently launched a new site and if you use www.neat-stuff.com/category it redirects from the old site to the new site just fine. However if you use www.neatstuff.com/category it does not properly redirect to www.neat-stuff.com/category. How do I fix that?
Intermediate & Advanced SEO | | EcommerceSite0 -
DMCA Complaint to Google - HELP
I have several sites copying my content, which I found out via Copyscape.com. Unfortunately, this is giving me duplicate content. I filed a DMCA complaint through Google and the infringing pages were approved but the pages still remain. Can someone please help me understand this better? I thought Google was supposed to remove these pages? Am I supposed to content the site owner to get the content removed or are their pages simply de-indexed?
Intermediate & Advanced SEO | | tutugirl0 -
How to 301 redirect ASP.net URLS
I have a situation where a site that was ASP.net has been replaced with a WordPress site. I've performed a Open Site Explorer analysis and found that most of the old pages, ie www.i3bus.com/ProductCategorySummary.aspx?ProductCategoryId=63 are returning a HTTP Status = NO DATA ... when followed ends up at the 404 catch-all page. Can I code the standard 301 Redirects in the .htaccess file for these ASP URLs? If not, I'm open to suggestions.... Thanks Bill
Intermediate & Advanced SEO | | Marvo0