SEO, 301s & backslashes at end of URL
-
Wordpess started adding "/" (slashes) at the end of my urls and I've left them up for some time. Will removing them hurt search rankings or do I need to do a 301 redirect?
For example - www.site.com/page1/ changed to www.site.com/page1
Are there any other ramifications I may not be thinking about besides just search rankings.
-
Thank you so much!
-
So, this is HUGE technical SEO mess.
There are two chances - hosting or plugin:
- Hosting - you can fix this with .htaccess quick. There are lot of examples in internet about adding or removing slash in end of url. You need to check and recheck your .htaccess or webserver configuration.
- Plugin - sometime when WP update their plugins some of them comes with something more than bugfix or improvement. This is how they think "shouldn't hurt anybody", but in reality hurt ANYBODY because broke things. You need to try disable plugins one-by-one and see is this caused from them. This can be caused also from theme, WP itself and/or some custom code.
This is cause of problem. But fix is hard because you need evaluate approx time of chance. There are two cases:
- If this happen soon you should fix it ASAP because for bots old pages are missing (you need to confirm that, please check, sometime they can 301 to new page).
- If this happen few months ago and rankings wasn't lost then you can leave it in new format (do also .htaccess fix!). If rankings was lost then you can try to fix this (and also .htaccess fix!). It's difficult decision anyway.
As you can see everything dependent how long is this change and what damages already make. Try to see in SearchConsole more info about crawl and ranking.
I will save you little time with code for removing AND adding trailing slashes:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [L,R=301]First code remove /, second code add / to urls. You also need to check canonicals, sitemaps and fix them according changes.
And one tip. You should always install in WP some plugin for backups. Period. You wasn't first nor last person in the world with situation "something happens". Of course one weekly backup cost you a penny and can save many hours of debugging or trying to fix things. There are many plugins in market with many different features so i can't give advise what will fit to your needs.
-
Will doing so have any impact on rankings or can I just make the full switch all at once without 301's.
-
So does this mean that you can access the same content with and without '/' ?
This would mean duplicate content and duplicate content isnt really liked by Google. You can redirect these urls to the preferred one by using htaccess
There should only be one version live.
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
-
How would you improve our URL structure?
Hi Mozzers, I have a question about the URL structure on our website (www.ikwilzitzakken.nl). We now have a main category with "zitzakken" (beanbags). We also have different brands, types and colours. Now we have URL's like this: <a>https://www.ikwilzitzakken.nl/zitzakken/vetsak/vetsak-fs600-flokati-zitzak/_381_w_3544_3862_NL_1</a> which seems long and not clean. Please don't look at the query at the end, we can't do anything about that in our CMS. In english this would be: https://www.iwantbeanbags.nl/beanbags/vetsak/vetsak-fs600-flokati-beanbag/_381_w_3544_3862_NL_1 How would you optimise this? We do have good rankings (this one ranks #1 for example), but I think our overall structure could be way better. Would love your thoughts about this.
On-Page Optimization | | TheOnlineWarp0 -
SEO Content Revolution Question
I was wondering if articles written about questions people are asking will help my website rank better. For example let's say I wrote an article answering the query, "What Hair Dye Does Angela Merkel Use?" or, "Is Hillary Clinton Thinking of Running for President," and they rank well on google, and in turn they get viewed a lot by searchers because it answers their queries. Would this help my website as whole start ranking better? Thanks!
On-Page Optimization | | OOMDODigital0 -
SEO Optimizing in UMBRACO
Hi there, I am planning to use UMBRACO to manage my existing website, so my question to Seomozzers out there is what should I be aware of, how safe is it to have UMBRACO in terms of SEO. By using this software, would it be possible to get a positive or negative impact on my keyword rankings? Thanks!
On-Page Optimization | | matti_wilson0 -
What are these means for SEO?
Geo Meta Tags Dublin core Microformats What are they and If they are helpful for SEO purposes.How can i set them?My site is in wordpress.
On-Page Optimization | | csfarnsworth0 -
SEO for luxury brands!?
Hi all, It is widely known fact that you will be a bit in trouble if you will need to do SEO for luxury brand that is not willing to sacrifice design, layout etc. for SEO purposes. So basically - there is no content to optimize and there is almost no keywords to rank! 😉 Just wondering - how would be the best to approach such kind of terrible situation? Regards, Jungle
On-Page Optimization | | Jungles0 -
Redirecting URLS on windows
Could anyone help out here please. A client of ours have reveloped their website from HTML to ASP (helpful!). They have 60 odd pages indexed in Google with the .html extension. We need to do a redirect on these pages so that all link juice is passed to the new pages. What would be the best way to do this please?
On-Page Optimization | | Grumpy_Carl0 -
Adding keywords to URL's
I understand the importance of having the keyword in the URL (at least now I do). When I created my site (www.enchantingquotes.com), I was completely ignorant about SEO. So....question is...how do I go about adding keywords to already done pages? Do I create a new section and then redirect - or do I have to basically recreate pages? Thx much 🙂
On-Page Optimization | | enchantedgirlz0 -
SEO strategy recommendations?
Hi My website http://www.harrisbassett.co.uk is now ranking on the 1st page of Bing and Google for phrases such as Chartered Accountant Swansea and Tax Planners Swansea But the phrase 'accountants swansea' is still performing poorly - as it is near the bottom of the second page? Would I be better placing more accountant swansea phrases on the homepage of the site or would this have an adverse effect on the current 'Chartered Accountants Swansea' ranking as would this be classed as keyword cannabilisation? So would it be better to further optimise http://www.harrisbassett.co.uk/accounting.htm and include the phrases Accountants Swansea and Auditors Swansea or would this act against the homepage? Sorry for the questions I am just looking for the best route forward to further boost the ranking on additional terms as the majority of the 1st page listings seem to weak?
On-Page Optimization | | idv0