How to setup a redirect from one subfolder to another to avoid duplicate content.
-
Hello All,
I have a WordPress site that Moz says has duplicate content.
http://deltaforcepi.com/latest-news/page/3
http://deltaforcepi.com/category/latest-news/page/3So I set up an addition to the .htaccess file . . .
redirect code to move from one folder to another
RewriteRule ^category/latest-news/(.*)$ /latest-news/$1 [R=301,NC,L]
What did I do wrong? I am not proficient in .htaccess files.
-
Thank you, I did not think it would have been an issue either but the customer did not like seeing that on the report and wanted it fixed. I will look into how to setup a robots.txt file to take care of this.
Michael
-
Google has always said and very recently repeated that internal duplicate content is not an issue, Google will simply decide on what content is best to return results too.
If you are concerned you have a few options instead of what you are doing.
Use the meta noindex so that Google does not index the data. If you cant do that because of wordpress then this can be set externally Using the X-Robots-Tag HTTP header.
https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
Hope that helps. Personally I would keep the page up because Google is used to dealing with wordpress and would punish thousands of sites if this was really an issue.
-
Nope, that didn't do it. I see that WordPress creates duplicate content from having an archive of posts made on the website. Maybe If I can have an robot.txt file that does not crawl that directory???
-
I believe it should be-
RewriteRule ^category/latest-news/(.*)$ http://yourdomain.com/latest-news/$1 [R=301,NC,L]
Try that and see if it doesn't fix it for you. (Replace 'yourdomain.com' with your real domain of course.)
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
-
How Does Google View Hidden Content?
I have a website which contains a lot of content behind a show hide, does Google crawl the "hidden" copy?
Web Design | | jasongmcmahon0 -
Site redesign - 301 Redirects
I've just overhauled a website, leaving lots of former posts in the dust. I've set up a 404 redirect to the home page so that if anyone goes to one of those old pages they land on the home page instead of a dead 404. But, there's a couple urls from the old site I'd prefer to redirect to similar pages. These urls have forward slashes and I don't know how to get the slashes in when I copy it over to the new site. This is probably something easy, but I'm baffled. This www.lawbarron.com/personal-injury/whip-its-nitrous-oxide/ becomes this when I copy it www.lawbarron.com/personal-injury-whip-its-nitrous-oxide Can someone help me out?
Web Design | | julie-getonthemap0 -
HTML and XML sitemaps for one website.
Hi all, First, we have created a HTML sitemap for our wordpress website. Then we again generated XML sitemap and submitted same in search console. It's been more than a week and still new XML sitemap has not been indexed yet. I can still only see HTML sitemap for search results "company sitemap". Also search console do have only XML sitemap. Both sitemaps are accessible but only HTML has been indexed. Is there anything wrong having 2 sitemaps? Why XML sitemap not been indexed? Thanks
Web Design | | vtmoz0 -
I have a site that has a 302 redirect loop on the home page (www.oncologynurseadvisor.com) i
i am trying to do an audit on it using screaming frog and the 302 stops it. My dev team says it is to discourage Non Human Traffic and that the bots will not see it. Is there any way around this or what can I tell the dev team that shows them it is not working as they state.
Web Design | | HayMktVT0 -
Content Migration & cost of moving pages
Hope you are all having a great day! I am wondering if anyone would be able to provide general feedback. I work for a medium size company in Chicago. Currently our site is static html and we are seeking to migrate to Wordpress. After speaking with a number of website companies and receiving proposals, I am trying to understand if there is an approximate going rate or range for moving content from static html to a CMS like Wordpress? i.e. a cost per page? We don't have any dynamic content. Most of our pages are text and images. The site itself, including the blog is around 220 pages. Thanks in advance for any insight or resources!
Web Design | | SEOSponge0 -
301 Redirect ! Joomla Pages, Already ranking. ( just wanted to change the url
hey guys hope everyone had a new year. I am ranking for a page on my site that i want to ( not specifically move ), but just change the url name: It is too long i think and i want to move it from one portion of my architecture to another menu. I have never physically done a 301 redirect myself, always had someone do it for me. I wanted some pointers. Since it is a fairly new site 4 months old! What are my options. Do i need to 301 redirect the page, if i am changing the Structure and AI of my site, or can i just change the url as is and it will still get ranked? How do i keep that url put delete the page and redirect it ? Sorry its very simple but i wanted to get the communities help to continue on ! Best Wishes HAmpig
Web Design | | BizDetox0 -
Redirection Of Mobile Traffic
Hi, I hope someone can help me with this, we have been working on creating a mobile version of our website, but does anyone know of a way of ensuring that mobile traffic is redirect to our mobile version, ie m.mydomain.com Thanks Rich
Web Design | | mos_rich0 -
Best way to handle related content links in a sidebar?
My site contains tens of thousands of articles, studies, multimedia files, biographies, etc. To assist users with finding content that might be related to the page they're on, I use a side bar with 'also of interest' links to other, similar content on my site. This is, of course, pretty standard practice. Search engines -- Google in particular -- index these pages and then include the text in the sidebar links in search results. So, for example, on a given page I may have 20 links to related content, and the text in those links might be, 'A story about subject ABC.' When I search for 'A story about subject ABC,' Google returns not only the page titled (and containing the content) 'A story about subject ABC.' but also every page that links to it and happens to have that link text in the sidebar. What is the proper way to handle this kind of thing?
Web Design | | smorrison0