Trailing Slashes on URLs
-
Hi we currently have a site on Wordpress which has two version of each URL trailing slash on URLs and one without it.
Example:
www.domain.com/page (preferred version - based on link data)
The non-slash version of the URL has most of the external links pointing to them, so we are going to pick that as the preferred version.
However, currently, each version of every URL has rel canonical tag pointing to the non-preferred version.
E.g. www.domain.com/page the rel canonical tag is: www.domain.com/page/
What would be the best way to clean up this setup?
Cheers.
-
Have you seen this related question? You can edit your .htaccess file to remove the trailing slash everywhere. Or, if you want to enforce the trailing slash and you're using Yoast, you can do that with one check of a checkbox. Either should be fine, but I think you have the right idea planning to remove all trailing slashes since that's how external links reference your site.
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
-
Does the url in for your homepage impact SEO
Is there any harm to SEO having a homepage url that is not clean like www.domain.com. For example citi uses https://online.citi.com/US/login.do Does that matter in any way? Would a company like citi benefit from changing to www.citi.com as their homepage?
Intermediate & Advanced SEO | | kcb81781 -
302 redirected URLs - login, account pages
We have a 302 redirection on some of our pages which involved login/account pages. So, some pages are 302 (temporarily) redirected to the login pages which is common especially in e-commerce sites (see screenshot). For SEO practices, what would be best to address this (if this an issue)? a. Block the login/account pages using robots.txt? b. Block the login/account pages using meta noindex? c. Leave them as is since it's a non-issue. d. Other recommendations, please specify in the answers.. Thanks! 2S9xn
Intermediate & Advanced SEO | | jayoliverwright0 -
Does a non-canonical URL pass link juice?
Our site received a great link from URL A, which was syndicated to URL B. But URL B is canonicalized to URL A. Does the link on URL B pass juice to my site? (See image below for a visual representation of my question) zgbzqBy
Intermediate & Advanced SEO | | Choice1 -
Is it better to have trailing slash or no trailing slash in URLs and what if both variations work?
Hi I have a situation on a website where the links are structured like this http://website.com/myurl/ so anywhere you click you will land on a page with a trailing slash but if i remove the trailing slash like this http://website.com/myurl the page is still going to open the same content. 1. so it works with and without the trailing slash. is this considered as duplicate content by google? and if so what is the best way to go? should i redirect al the non trailing slash urls to trailing slash or the opposite? 2. if i redirect am i going to loose some link juice from existing external links which mainly already point to urls without th trailing slash. 3. i've noticed that the sitemap.xml contains links without the trailing slash .. should it contain the urls with the trailing slash? Also there's many external links pointing to this site but withouth the trailng slash like this http://website.com/myurl
Intermediate & Advanced SEO | | urkeman0 -
Which URLs were indexed 2 years ago?
Hi, I hope anyone can help me with this issue. Our french domain experienced a huge drop of indexed URLs in 2012. More than 50k URLs were indexed, after the drop less than 10k were counted. I would like to check what happened here and which URLs were thrown out of the index. So I was thinking about a comparison between todays data and the data of 2012. Unfortunately we don't have any data on the indexed pages in 2012 beside the number of indexed pages. Is there any way to check, which URLs were indexed 2 years ago?
Intermediate & Advanced SEO | | Sandra_h0 -
International Domain and URL Method of Preference
I'm seeing varied opinions and methods preferred for domain/URL structure on international websites. A specific example we have now is an international brand in Asia, USA, Brazil/South America, Australia, New Zealand and Africa. Their current domains are all fragmented across the brand and our goal is to have them unified, examples of their issue here; country.brand.com
Intermediate & Advanced SEO | | Cuker
www.brand.com.au
www.brand.co.nz What I'm looking for is an approach that will have the best long term impact but no short term losses as well. I'm leaning toward www.brand.com.eu or www.brand.com/eu/ Looking at SERP's for other countries, subdomain geographic segmenting doesn't seem to show on any first pages in the SERPs. There is one other option I'm still interested in finding out more about, geographically segmenting sites and pages through canonical or hreflang. Interested in hearing some additional POV's. Thanks! Anthony0 -
URL or Domain length
Hi All, I am wondering if google still does give importance to the length of the domain or url. If yes then how much is the acceptable length of a domain and URL. Many Thanks!
Intermediate & Advanced SEO | | HiteshBharucha0 -
From an SEO Standpoint, which is better for my product category URLs?
With our e-commerce store, we can customize the URL for the product categories, so we could have: http://www.storename.com/product-category-keywords/ or http://www.storename.com/product-category-keywords.html From an SEO standpoint (or even from a "trying to get links" standpoint), which would be better to have? I feel like having a *.html category page would be easier for link building, but that's just my personal feelings. Side Note: Our product pages are: http://www.storename.com/product-name.html Thanks in advance
Intermediate & Advanced SEO | | fenderseo0