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
-
301 redirect recovery
Hello Please understand that English is poor. I used to run a site called A This time, I am running a site called B. I need to set up a temporary 302 redirect from A to B
Intermediate & Advanced SEO | | jinseok
I accidentally set a 301 redirect Site A has many spam links
For now I have removed the 301 redirect source to B. Will A's spam links affect site B?
For your reference, Site B is putting a lot of effort into SEO. Help me.0 -
Content question please help
Would content behind a drop down on this site Https://www.homeleisuredirect.com/pool_tables/english_pool_tables/ you have to click the - more about English pool tables text under the video Work just as well for SEO as content on the page like this site http://www.pooltablesonline.co.uk/uk-slate-bed-pool-tables.asp
Intermediate & Advanced SEO | | BobAnderson0 -
301 from one site to another
I have two e-commerce websites and i'm going to remove some products from website as requested by a supplier and sell them only on one site. Is it a good idea to 301 redirect the pages from site 1 to site 2?? Thanks for your help
Intermediate & Advanced SEO | | Aikijeff0 -
Please help with page
We used to use this page http://www.discountbannerprinting.co.uk/banners/vinyl-pvc-banners.html to rank for the words vinyl banner and PVC banner but we have tried to focus the page only on PVC banners and move the vinyl banners word to http://www.discountbannerprinting.co.uk/ yet for some reason even though they have both been spidered google has now chosen to rank this page http://www.discountbannerprinting.co.uk/stickers/vinyl-stickers.html for the vinyl banner words- how do I stop this from happening I thought the home page would be powerful enough to rank for the word with a title inclusion and a spread of the word on the page. Also if anyone can give their opinion on why they thinkhttp://www.discountbannerprinting.co.uk/banners/vinyl-pvc-banners.html does not rank very well I would be truly appreciative.
Intermediate & Advanced SEO | | BobAnderson0 -
Help needed for a 53 Page Internal Website Structure & Internal Linking
Hey all... I'm designing the structure for a website that has 53 pages. Can you take a look at the attached diagram and see if the website structure is ok? On the attached diagram I have numbered the pages from 1 to 53, with 1 being the most important home page - 2,3,4,5, being the next 4 important pages - 6,7,8... 15,16,17 being the 3rd set of important pages, and 18,19,20..... 51,52,53 being the last set of pages which are the easiest to rank. I have two questions: Is the website structure for this correct? I have made sure that all pages on the website are reachable. Considering the home page, and page number 2,3,4,5 are the most important pages - I am linking out to these pages from the the last set of pages (18,29,20...51,52,53). There are 36 pages in the last set - and out of this 36, from 24 of them I am linking back to home page and page number 2,3,4,5. The remaining 8 pages of the 36 will link back to pages 6,7,8...15,16,17. In total the most importnat page will have the following number of internal incoming links: Home Page : 25 Pages 2,3,4,5 : 25 Pages 6,7,8...15,16,17 : 4 Pages 18,19,20...51,52,53 : 1 Is this ok considering home page, and pages 2,3,4,5 are the most important? Or do you think I should divide and give more internal links to the other pages also? If you can share any inputs or suggestions to how I can improve this it will greatly help me. Also if you know any references for good guides to internal linking of websites greater that 50 pages please share them in the answers. Thank you all! Regards, P.S - The URL for the image is at http://imgur.com/XqaK4
Intermediate & Advanced SEO | | arjun.rajkumar810 -
I need help with setting the preferred domain; www. or not??
Hi! I'm kinda new to the SEO game and struggling with this site I'm working on: http://www.moondoggieinc.com I set the preferred domain to www. in GWT but I'm not seeing it reroute to that? I can't seem to get any of my internal pages to rank, and I was thinking it's possiblly b/c of a duplicate content issue cause by this problem. Any help or guidance on the right way to set preferred domain for this site and whiy I can't get my internal pages to rank? THANKS! KristyO
Intermediate & Advanced SEO | | KristyO0 -
Need a mobile XML Sitemap?
We're going to be running our mobile site on the same domain and generating content for users on mobile devices with style sheets (will not have m.domain). The content on our URLs will be the exact same. My question is if we need to create a mobile XML Sitemap to submit to the search engines. Do we need to create the Sitemap, that will contain the exact same URLs as our non-mobile Sitemap, and just include <mobile><mobile>tags around the URLs? Or do we need to create a mobile Sitemap at all to alert the search engines that we have mobile content?</mobile></mobile> Thanks!
Intermediate & Advanced SEO | | bonnierSEO0 -
301 from penalized domain to new domain
I have a client whose site isn't necessarily penalized since they still show for many terms in the SERPS, however at one point they did an xrummer blast of 13,000 links for two anchor texts they were trying to rank for. They have purchased a new domain and have gone white hat and want to 301 some of the old site to the new purely for the users sake so past visitors still find them at t the new location. Will creating 301 redirects pass on to the new domain any bad Karma from the old one in Google's eyes? Thanks for the help.
Intermediate & Advanced SEO | | JoshGill270