Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Magento Trailing Slash URL Problem
- 
					
					
					
					
 Howdy Mozzers! Our magento store URL's are accessible with or without a trailing slash at the end. Canonical's and 301 redirects are not set up for one of them at the moment. Will this cause duplicate issue? Do we need to set canonical or 301 up? Which one is recommended? MozAddict 
- 
					
					
					
					
 Ok, so we could canonical the first page in the pagination, that way any links to the pagination would flow juicy juice to the first page. That would make sense, since it would strengthen its ranking as a landing page as well. I think ill implement the canonical and get rid of the content on pagination anyways, just avoid the problem completely. Ace Marty! 
- 
					
					
					
					
 If you are using rel canonical then you can have the same on each page and it should be okay. Otherwise, I would make sure your paginated pages don't have it. The next/prev helps Google to understand these are subsequent pages of the original category but it doesn't really give instruction as to the preferred page, etc. (like the canonical would) so you could end up with Google ignoring the content after it sees it too many times. 
- 
					
					
					
					
 Appreciate your response Marty. What is your opinion on content for category pages. Currently we have the same content displaying on paginated pages for the same category (?p=1, ?p=2, etc) Should we display content just on the first page and remove it for rest of the pagination or is this ok? We are using rel="next/prev" but not sure if this is treated as duplication? 
- 
					
					
					
					
 I personally prefer the slash but it doesn't make any difference as long as you're consistent and if as you say Google is already indexing most without, I'd probably go that way too! 
- 
					
					
					
					
 Great answers guys! I would personally also prefer 301's over canonicals. So the next questions is, to keep URLs with the trailing slash or without the trailing slash. I tend to lean towards without, since most URL's are indexed that way already, its easier on the eyes, and people tend to link that way. Any preference? 
- 
					
					
					
					
 Good day MozAddict! SEO for Magento is near and dear to my heart. From a technical SEO perspective, I would recommend cleaning up the items you mentioned as it can cause issues. The biggest concern is trust flow and having trust split between two versions of the page (ie: the slash and no-slash). So both the 301 and canonical tag will pass the same amount of trust as the other. So your question is, which do you go with? I think both are fine however I prefer the 301 myself for dealing with the trailing slash issue and here's why. As time passes, believe it or not, people will link to some of your pages naturally. Because a canonical or 301 doesn't pass the full trust earned from the link, I'd rather someone link to the correct version. If I'm using the canonical tag, they may indeed link to the non-preferred version and I would lose some of that trust, whereas if I am using the 301, they will automatically be shown the correct, preferred version and I earn all the trust from that natural link. Moz has a great article on canonicalization if you want to read more on it. Hope this answer is useful to you! 
- 
					
					
					
					
 Definitely a duplication issue as they are 2 different pages. Pick one way and stick to it, probably remove is the easiest. I would do redirects first, but set canonical as well as a best practice. There is a great guide here: http://www.kodecreations.co.uk/google/remove-trailing-slash-magento-urls-duplicate-content-issue/ It even includes instructions on how to stop Magento from generating urls with trailing slashes. 
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 ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		Does google ignore ? in url?
 Hi Guys, Have a site which ends ?v=6cc98ba2045f for all its URLs. Example: https://domain.com/products/cashmere/robes/?v=6cc98ba2045f Just wondering does Google ignore what is after the ?. Also any ideas what that is? Cheers. Intermediate & Advanced SEO | | CarolynSC0
- 
		
		
		
		
		
		Does rewriting a URL affect the page authority?
 Hi all, I recently optimized an overview page for a car rental website. Because the page didn’t rank very well, I rewrote the URL, putting the exact keyword combination in it. Then I asked Google to re-crawl the URL through Search Console. This afternoon, I checked Open Site Explorer and saw that the Page Authority had decreased to 1, while the subpages still have an authority of about 18-20. Hence my question: is rewriting a URL a bad idea for SEO? Thank you, Intermediate & Advanced SEO | | LiseDE
 Lise0
- 
		
		
		
		
		
		Should I include URLs that are 301'd or only include 200 status URLs in my sitemap.xml?
 I'm not sure if I should be including old URLs (content) that are being redirected (301) to new URLs (content) in my sitemap.xml. Does anyone know if it is best to include or leave out 301ed URLs in a xml sitemap? Intermediate & Advanced SEO | | Jonathan.Smith0
- 
		
		
		
		
		
		URL Injection Hack - What to do with spammy URLs that keep appearing in Google's index?
 A website was hacked (URL injection) but the malicious code has been cleaned up and removed from all pages. However, whenever we run a site:domain.com in Google, we keep finding more spammy URLs from the hack. They all lead to a 404 error page since the hack was cleaned up in the code. We have been using the Google WMT Remove URLs tool to have these spammy URLs removed from Google's index but new URLs keep appearing every day. We looked at the cache dates on these URLs and they are vary in dates but none are recent and most are from a month ago when the initial hack occurred. My question is...should we continue to check the index every day and keep submitting these URLs to be removed manually? Or since they all lead to a 404 page will Google eventually remove these spammy URLs from the index automatically? Thanks in advance Moz community for your feedback. Intermediate & Advanced SEO | | peteboyd0
- 
		
		
		
		
		
		Are these URL hashtags an SEO issue?
 Hi guys - I'm looking at a website which uses hashtags to reveal the relevant content So there's page intro text which stays the same... then you can click a button and the text below that changes So this is www.blablabla.com/packages is the main page - and www.blablabla.com/packages#firstpackage reveals first package text on this page - www.blablabla.com/packages#secondpackage reveals second package text on this same page - and so on. What's the best way to deal with this? My understanding is the URLs after # will not be indexed very easily/atall by Google - what is best practice in this situation? Intermediate & Advanced SEO | | McTaggart0
- 
		
		
		
		
		
		Why is this SERP displaying an incorrect URL for my homepage?
 The full URL of a particular site's homepage is something like http://www.example.com/directory/. Intermediate & Advanced SEO | | TheEspresseo
 The canonical and og URLs match.
 The root domain 301 redirects to it using the absolute path. And yet the SERP (and the cached version of the page) lists it simply as http://www.example.com/. What gives? Could the problem be found at some deeper technical level (.htaccess or DirectoryIndex or something?) We fiddled with things a bit this week, and while our most recent changes appear to have been crawled (and cached), I am wondering whether I should give it some more time before I proceed as if the SERP won't ever reflect the correct URL. If so, how long? [EDIT: From the comments, see here: https://www.youtube.com/watch?v=z8QKIweOzH4#t=2838]0
- 
		
		
		
		
		
		Internal links and URL shortners
 Hi guys, what are your thoughts using bit.ly links as internal links on blog posts of a website? Some posts have 4/5 bit.ly links going to other pages of our website (noindexed pages). I have nofollowed them so no seo value is lost, also the links are going to noindexed pages so no need to pass seo value directly. However what are your thoughts on how Google will see internal links which have essential become re-direct links? They are bit.ly links going to result pages basically. Am I also to assume the tracking for internal links would also be better using google analytics functionality? is bit.ly accurate for tracking clicks? Any advice much appreciated, I just wanted to double check this. Intermediate & Advanced SEO | | pauledwards0
- 
		
		
		
		
		
		Urls missing from product_cat sitemap
 I'm using Yoast SEO plugin to generate XML sitemaps on my e-commerce site (woocommerce). I recently changed the category structure and now only 25 of about 75 product categories are included. Is there a way to manually include urls or what is the best way to have them all indexed in the sitemap? Intermediate & Advanced SEO | | kisen0
 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				