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
- 
		
		
		
		
		
		Duplicate, submitted URL not selected as canonical
 Hi all, A number of our pages have dropped out of search rankings. It seems they are being marked as "Duplicate, submitted URL not selected as canonical" However, the page Google is choosing as the canonical is totally different - different headings, titles, metadata, content on the page. We are completely mystified as to why this is happening. If anyone can shed any light, it would be hugely appreciated! Example URL is this one: Technical SEO | | Eric_S
 https://www.vouchedfor.co.uk/IFA-financial-advisor-mortgage/london Which Google seems to think is a duplicate of this: https://www.vouchedfor.co.uk/solicitor/london0
- 
		
		
		
		
		
		URL has caps, but canonical does not. Now what?
 Hi, Just started working with a site that has the occasional url with a capital, but then the url in the canonical as lower case. Neither, when entered in a browser, resolves to the other. It's a Shopify site. What do you think I should do? Technical SEO | | 945010
- 
		
		
		
		
		
		Add trailing slash after removing .html extention
 My website is non www ,it has wordpress in subdirectory and some static webpages in the root and other subdirectory 1. i want to remove .html extention from the webpages in the root and Technical SEO | | Uber_
 the others static webpages in subdirectory.
 2. add slash at the end.
 3. 301 redirect from non slash to url with slash. so it should be http://ghadaalsaman.com/articles.html to http://ghadaalsaman.com/articles/ and http://ghadaalsaman.com/en/poem-list.html to http://ghadaalsaman.com/en/poem-list/ the below code 1. working with non slash at the end **2. **redirect 301 url with slash to non here's my .htaccess <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews RewriteEngine On
 RewriteBase /</ifmodule> #removing trailing slash
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)/$ $1 [R=301,L] #www to non
 RewriteCond %{HTTP_HOST} ^www.(([a-z0-9_]+.)?domain.com)$ [NC]
 RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] #html
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^([^.]+)$ $1.html [NC,L] #index redirect
 RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
 RewriteRule ^index.html$ http://ghadaalsaman.com/ [R=301,L]
 RewriteCond %{THE_REQUEST} .html
 RewriteRule ^(.*).html$ /$1 [R=301,L] PS everything is ok with the wordpress , the problems with static pages only. Thanks in advanced0
- 
		
		
		
		
		
		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 Slash Problems
 Link juice being split between trailing slash and non versions. ie. ldnwicklesscandles.com/scentsy-uk and ldnwicklesscandles.com/scentsy-uk/ Initially asked in here and was told to do a rewrite in the htaccess file. I don't have access to this with squarespace, nor can I add canonical tags on a page by page basis. 301 redirect from scentsy-uk to scentsy-uk/ didn't work either...said that the redirect wasn't completing in an error message on the browser. Squarespace hasn't been very helpful at all. My question is....is there another way to fix this? or should I just call it a day with squarespace and move to wordpress? Technical SEO | | cmjolley0
- 
		
		
		
		
		
		Redirect non-www if using canonical url?
 I have setup my website to use canonical urls on each page to point to the page i wish Google to refer to. At the moment, my non-www domain name is not redirected to www domain. Is this required if i have setup the canonical urls? This is the tag i have on my index.php page rel="canonical" href="http://www.mydomain.com.au" /> If i browse to http://mydomain.com.au should the link juice pass to http://www.armourbackups.com.au? Will this solve duplicate content problems? Thanks Technical SEO | | blakadz0
- 
		
		
		
		
		
		Old URL redirect to New URL
 Alright I did something dumb a year a go and I'm still paying for it. I changed my hyphenated URL to the non-hyphenated version when I redesigned my website. I say it was dumb because I lost most of my link juice even though I did 301 redirects (via the htaccess file) for almost all of the pages I could find in Google's index. Here's my problem. My new site took a huge hit in traffic (down 60%) when I made the change and even though I've done thousands of redirects my old site is still showing up in the SERPS and send much if not most of my traffic. I don't want to take the old site down in fear it will kill all of my traffic. What should I do? Is there a better method I should explore then 301 redirects? Could the other site be affecting my current rank since it's still there? (FYI...both sites are built on the WP platform). Any help or ideas are greatly appreciated. Thank you! Joe Technical SEO | | kaje0
- 
		
		
		
		
		
		Duplicate canonical URLs in WordPress
 Hi everyone, I'm driving myself insane trying to figure this one out and am hoping someone has more technical chops than I do. Here's the situation... I'm getting duplicate canonical tags on my pages and posts, one is inside of the WordPress SEO (plugin) commented section, and the other is elsewhere in the header. I am running the latest version of WordPress 3.1.3 and the Genesis framework. After doing some testing and adding the following filters to my functions.php: <code>remove_action('wp_head', 'genesis_canonical'); remove_action('wp_head', 'rel_canonical');</code> ... what I get is this: With the plugin active + NO "remove action" - duplicate canonical tags Technical SEO | | robertdempsey
 With the plugin disabled + NO "remove action" - a single canonical tag
 With the plugin disabled + A "remove action" - no canonical tag I have tried using only one of these remove_actions at a time, and then combining them both. Regardless, as long as I have the plugin active I get duplicate canonical tags. Is this a bug in the plugin, perhaps somehow enabling the canonical functionality of WordPress? Thanks for your help everyone. Robert Dempsey0
 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				