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.
Trailing slash URLs and canonical links
- 
					
					
					
					
 Hi, I've seen a fair amount of topics speaking about the difference between domain names ending with or without trailing slashes, the impact on crawlers and how it behaves with canonical links. 
 However, it sticks to domain names only.
 What about subfolders and pages then? How does it behaves with those?Say I've a site structured like this: 
 https://www.domain.com
 https://www.domain.com/page1And for each of my pages, I've an automatic canonical link ending with a slash. 
 Eg. rel="canonical" href="https://www.domain.com/page1/" /> for the above page. SEM Rush flags this as a canonical error. But is it exactly?
 Are all my canonical links wrong because of that slash?And as subsidiary question, both domain.com/page1 and domain.com/page1/ are accessible. Is it this a mistake or it doesn't make any difference (I've read that those are considered different pages)? Thanks! 
 G
- 
					
					
					
					
 Hi Robert. I will get the code checked and most probably set that redirect rule indeed. 
 Many thanks for the advice!
- 
					
					
					
					
 Hi G, Yes. domain.com/page1 and domain.com/page1**/ **are two different pages in the eyes of Google. But the canonical should fix this issue.... i don't know why SEMrush is flagging them. Maybe you can contact them and just ask? For as far as I know, the best solution is to use just one version, and redirect the other one. So all the URL's without a slash, would be redirecting to the url with the slash. In this case, you don't have to change the canonical. But be aware: this is what works with my sites. I don´t know all the details about your site. So contact SEMrush first and/ore let somebody take a look at your code. 
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
- 
		
		
		
		
		
		Broken canonical link errors
 Hello, Several tools I'm using are returning errors due to "broken canonical links". However, I'm not too sure why is that. Eg. Technical SEO | | GhillC
 Page URL: domain.com/page.html?xxxx
 Canonical link URL: domain.com/page.html
 Returns an error. Any idea why? Am I doing it wrong? Thanks,
 G1
- 
		
		
		
		
		
		Canonical homepage link uses trailing slash while default homepage uses no trailing slash, will this be an issue?
 Hello, 1st off, let me explain my client in this case uses BigCommerce, and I don't have access to the backend like most other situations. So I have to rely on BG to handle certain issues. I'm curious if there is much of a difference using domain.com/ as the canonical url while BG currently is redirecting our domain to domain.com. I've been using domain.com/ consistently for the last 6 months, and since we switches stores on Friday, this issue has popped up and has me a bit worried that we'll loose somehow via link juice or overall indexing since this could confuse crawlers. Now some say that the domain url is fine using / or not, as per - https://a-moz.groupbuyseo.org/community/q/trailing-slash-and-rel-canonical But I also wanted to see what you all felt about this. What says you? Technical SEO | | Deacyde0
- 
		
		
		
		
		
		Category URL Pagination where URLs don't change between pages
 Hello, I am working on an e-commerce site where there are categories with multiple pages. In order to avoid pagination issues I was thinking of using rel=next and rel=prev and cannonical tags. I noticed a site where the URL doesn't change between pages, so whether you're on page 1,2, or 3 of the same category, the URL doesn't change. Would this be a cleaner way of dealing with pagination? Technical SEO | | whiteonlySEO0
- 
		
		
		
		
		
		Link rel="prev" AND canonical
 Hi guys, When you have several tabs on your website with products, you can most likely navigate to page 2, 3, 4 etc... Technical SEO | | AdenaSEO
 You can add the link rel="prev" and link rel="next" tags to make sure that 1 page get's indexed / ranked by Google. am I correct? However this still means that all the pages can get indexed, right? For example a webshop makes use of the link rel="prev" and ="next" tags. In the Google results page though, all the seperate tabs pages are still visible/indexed..
 http://www.domain.nl/watches/?tab=1
 http://www.domain.nl/watches/?tab=24
 http://www.domain.nl/watches/?tab=19
 etc..... Can we prevent this, and make sure only the main page get's indexed and ranked, by adding a canonical link on every 'tab page' to the main page --> www.domain.nl/watches/ I hope I explained it well and I'm looking forward to hearing from you. Regards, Tom1
- 
		
		
		
		
		
		Numbers in URL
 Hey guys! Need your many awesome brains. 🙂 This may be a very basic question but am hoping you can help me out with some insights beyond "because Google says it's better". 🙂 I only recently started working with SEO, and I work for a SaaS website builder company that has millions of open/active user sites, and all our user sites URLs, instead of www.mydomainname.com/gallery or myusername.simplesite.com/about, we use numbers, so www.mysite.com/453112 or myusername.simplesite.com/426521 The Sales manager has asked me to figure out if it will pay off for us in terms of traffic (other benefits?) to change it from the number system to the "proper" and right way of setting up these URLs. He's looking for rather concrete answers, as he usually sits with paid search and is therefore used to the mindset of "if we do x it will yield us y in z months". I'm finding it quite difficult to find case studies/other concrete examples beyond the generic, vague implication that it will simply be "better" (when for example looking at SEO checklists and search engine guidelines). Will it make a difference? How so? I have to convince our developers of the importance and priority of this adjustment, or it will just drown in the many projects they already have. So truly, any insights would be so very welcome. Thank you! Technical SEO | | michelledemaree2
- 
		
		
		
		
		
		Trailing Slashes on Home Pages
 I do not think I have a problem here, but a second opinion would be welcomed... I have a site which has a the rel=canonical tag with the trailing slash displayed. ie www.example.com/ The sitemap has it without the trailing slash. www.example.com Google has it's cached copy with the trailing slash but the browser displays it without. I want to say it's perfectly fine (for the home page) as I tend to think they are treated (with/without trailing slashes) as the same canonical URL. Technical SEO | | eventurerob0
- 
		
		
		
		
		
		I need help with a PHP canonical URL tags
 I found a little difficult for me to do a canonical tag in my PHP. On-Page Report Card We check to make sure that IF you use canonical URL tags, it points to the right page. If the canonical tag points to a different URL, engines will not count this page as the reference resource and thus, it won't have an opportunity to rank. If you've not made this page the rel=canonical target, change the reference to this URL. NOTE: For pages not employing canonical URL tags, this factor does not apply. I don't know how to tidy my PHP Any suggestion. Technical SEO | | lnietob0
- 
		
		
		
		
		
		Web config redirects not working where a trailing slash is involved
 I'm having real trouble with getting working redirects in place to use on a site we're re-launching with a modified url structure. Old URL: http://www.example.com/example_folder/ New URL: http://www.example.com/example-of-new-folder/ Now, where the old URL's have a trailing slash the web.config simply will not accept it. It says the URL can start with a slash, but not end with a slash. However, many of my URL's do end with a slash so I need a workaround. These are the rules I'm putting in place: <location path="example_folder/"></location> Thanks Technical SEO | | AndrewAkesson0
 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				