Do trailing / in URLs matter?
-
I was wondering if search engines see duplicate content on two different URLs if the content is available via www.xyz.com/services or www.xyz,com/services/
-
We have a similar thread going, and I believe it may help resolve some of your questions concerning the trailing slash: http://www.seomoz.org/q/trailing-slash-and-rel-canonical
-
Hi,
Technically yes,
Be sure to back up your .htaccess before trying but this below should remove the trailing slash (by redirecting / to non slash), and fix duplicate if you have it. But like i said back up first just in case
#remove trailing slashes RewriteCond %{HTTP_HOST} !^\.domain\.com$ [NC] RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
EDIT
Since I am not full aware of your actual situation... Below is if you only want to redirect trailing slash on URI's that are past root (sub directories redirected, but www.example.com/ is left alone
<code>RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} (.*)$ RewriteRule ^(.+)/$ http://www.domain.com/$1 [R=301,L]</code>
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
-
PDF Optimization Question: Does URL Structure Matter?
Hi Mozzers: I am optimizing a bunch of PDF brochures within a client's website. Besides the typical optimization tactics I'm applying, (like these) I have a question regarding the file/url structure of the PDFs themselves. By default, the client is locating PDFs in an 'uploads' folder of their Wordpress site. So, a typical PDF might have a URL such as: https://www.Xyzinsurance.com/xyz-content/uploads/2015/06/Brochure-XYZ-Connect.pdf My question: is there any advantage in eliminating all these sub-directories and moving the files into a main folder, simply titled '/brochures' ?? Any insights or conjecture would be welcome!
Technical SEO | | Daaveey0 -
URL Structure
Hi, Hope you are all well. On our website we have a 'blog' and a 'news' section. The blog is located on "/blog" - but when you click on a post the url structure changes to /name-of-article and the blog subdomain isn't included. Would it be better to have "blog/name-of-article as this would then make the blog perform better in search results? Also, if our news page is under /news - but when you click on an article it changes to /news-article/name-of-article Wouldn't it be better to have /news/name-of-article Thanks a lot!! 🙂
Technical SEO | | National-Homebuyers0 -
Mirrored content/ images
We are currently in the process of creating a new website in place of our old site (same URL etc.) We've recently created another website which has the same design/ layout/ pictures and general site architecture as our new site will have. If I was to add alt test to images only on one site would we still be penalised by Google as the sites 'look' the same, event thought they will have completely different URL's and different focusses on a similar topic. Content will be different also, but both sites will focus on a similar subject. Thanks
Technical SEO | | onlinechester0 -
Determine the best URL structure
Hi guys, I'm working my way through a URL restructure at the moment and I've several ideas about the best way to do it. However, it would be good to get some views on this. At the moment I'm working on a property website - http://bit.ly/N7eew7 As you can quickly see, the URL structure of the site needs a lot of work. Similar websites - http://bit.ly/WXH5WG http://bit.ly/Q3UiLC One of the sites has http://www.domain.ie/property-to-let/location/ And the other has http://www.domain.ie/rentals/location/property-to-let/ I could do with some guidance about the best steps to take with this. I've a few ideas myself but this is a massive project. Cheers, Mark
Technical SEO | | MarkScully0 -
Url canonicalization: www. to http://
Hey there. Sorry for the simple question but I recently redesigned a site and published with WordPress, in the process the domain structure changed from being www. to http:// . My question is does this change affect the value we get from links pointing to the old www. domain structure? The reason I ask is that the old site had a domain authority of 36 with OSE and a couple of hundred links but the new site address shows as having zero domain authority and zero links. Is there some best practise I should be following to retain link value?
Technical SEO | | Luia0 -
/forum/ or /hookah-forum/
I'm building a new website on Hookah.org. It will have a forum and blog. Should I put them in Hookah.org/hookah-forum/ and Hookah.com/hookah-blog/ or Hookah.org/forum and Hookah.org/blog I think /forum/ and /blog/ are easier for users but am not sure how much adding the word hookah helps with SEO.
Technical SEO | | Heydarian0 -
Is it a problem to have a homepage with a slug / URL ?
Hi, We are designing a web site for one of our clients, and using a home made CMS. I don't know how this CMS has been built, but anyways, in the end the homepage has a URL format which looks like this : www.mydomain.com/my-custom-url.html. No www.mydomain.com. Is it dangerous for SEO to have a slug/URL directly on the homepage ? Do you have experiences, cases where it has impacted a site negatively ? The main problem I expect is duplicate content (with Google seeing both www.mydomain.com and www.mydomain.com/my-custom-url.html as being different pages) but apparently the CMS is doing a 302 redirect from the root domain to the URL (I told my colleague it should at least be a 301). Sorry if this question seems like basic SEO knowledge, but I really can't find a definitive answer on the subject. Thank you very much 🙂
Technical SEO | | edantadis0 -
Should I be redirecting a .gov.au domain to a .com/.com.au Marketing URL?
Hi everyone, First time post - what a great community! On a trial at the moment but will definitely be signing up to PRO. The situation I'm helping to promote an event in Australia (lets call it "myevent"). The event also goes by a nickname "myev" (which isn't searched as much as "myevent"). The event for the most part is promoted offline as www.myevent.com. As it currently stands (and appears to have been the case for a number of years), www.myevent.com and www.myevent.com.au 302 redirect to www.mylocation.gov.au/myev The event is pretty much number 1 for keywords around "my event" and "myev", despite little attention being paid to on page optimisation and issues around duplicate content which I intend to fix. The domain being indexed by Google is www.mylocation.gov.au/myev . Open site explorer stats Open Site explorer shows www.mylocation.gov.au/myev as having a strong domain authority, and hundreds of backlinks. www.myevent.com and www.myevent.com.au have domain authorities in the 20s and about 30-40 backlinks each. The conundrum I've had a chat with the IT guys running the site(s) and they mentioned they'll be switching the way the redirects work, so everything goes to www.myevent.com NOT the .gov.au URL. I've done a bit of reading on the forums and understand that 301s should be used in order to pass the juice/authority from the existing domain (in this case www.location.gov.au/mye). I understand not all of this will be passed. What I'm not sure about is which URL should be the final preferred destination. I may not have a choice - www.myevent.com has been the preferred URL for a long time - but want to know if this will affect the performance in search results if the .com.au isn't used as the final destination (even though we would be redirecting from it)? Any suggestions / ideas / help would be most appreciated. I hope this all makes sense - I'm relatively new to the whole SEO world! Best wishes and many thanks.
Technical SEO | | hergs0