Community Forums › Forums › Archived Forums › General Discussion › Slash in the end of URL creates duplicate pages?
Tagged: duplicate content, seo
- This topic has 2 replies, 2 voices, and was last updated 10 years, 10 months ago by works.
-
AuthorPosts
-
June 25, 2013 at 5:19 pm #47732worksMember
A xml sitemap generator showed me having tons of duplicate pages, showing that crawlers probably see all my URLs for pages but only without slash in the end, as duplicates of those with slashes.
I obviously just wrote one page (without duplicates), the slash was automatically created for each page. And i have no idea how to "remove the duplicates" which i never wrote and do not even have in my All Pages manager. Slash or no slash, whichever it is, it needs to be only one page. How do i achieve that?
What did i do wrong and end up having both kinds? How do i remove the other one?
Other people's sites seem to automatically redirect to the slash version of the page URL. Why does my site do not redirect but opens and stays on URL without the slash if someone happen to type the URL without the slash into the address bar?
Please help!
Thank you in advance.June 26, 2013 at 2:46 am #47755blogjunkieParticipantFirst of all, I think you should verify that duplicate issues are indeed a problem for your site. You can do this by going to Google and searching for:
site:yoursite.com
This will return all the pages that Google has indexed for your site. Do you see duplicate results (1 with trailing slash and 1 that doesn't)? I'm betting you won't because Genesis makes use of the canonical tag to tell search engines which is the correct URL to index.
If you do see duplicate content, and/or if you want to leave nothing to chance, you can do this:
1. Make sure that your permalink settings are the way you want it. By default it's set up to be /%postname%/ (with a trailing slash). If you don't want the trailing slash, change it to /%postname%
2. Add some code to your .htaccess file to redirect visitors to the canonical version of the URL (automatically add or remove the trailing slash). Here are 2 pages that has the code you need.
http://stackoverflow.com/questions/4167539/remove-trailing-slash-using-htaccess-except-for-home-landing-page
http://stackoverflow.com/questions/11829714/add-trailing-slash-htaccessNote: If you don't know what a .htaccess file is you probably shouldn't do step 2.
Good luck!
WordPress evangelist, Nike runner, Apple fanboy.
Work: ClickWP WordPress Support, Play: adventures of a blogjunkie. Talk to me on Twitter @blogjunkieJune 26, 2013 at 6:11 pm #47896worksMemberThank you so very much, Blogjunkie. It was most helpful and now my slashless URLs look so much prettier (what a great boost to my work motivation).
As for .htaccess file, (you guessed it right, i have no idea what it means and what am i doing, but) i already redirect all my indexed pages as they all used to have www. preffixes and .html extensions. So each redirect command in my .htaccess looks like this (is this the correct way?):
redirect 301 /fibroid-surgery.html http://healing-fibroids.com/fibroid-surgery
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.