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
-
Affect of ™ and ® in title for SEO
I am looking at adding the trademark and rights reserved symbols to some of my titles. I think this might help with click through rate. From what I have found, this shouldn't have an affect on SEO unless it makes the title too long. Is this correct? Stephen
On-Page Optimization | | stephen.volker1 -
Optimizing a URL/menu structure
Hi Mozzers, I'm working on Content Strategy at my job, and I'm close to making some recommendations on short/long-term direction. While I'm there, I want to tackle the URL/menu structure (correct term?), which is a bit of a mess as pages have been created without any consideration for it over time. For ease, let's just say we have 3 main subdirectories of the site (Section A-C), and let's also say that section A also has 3 important subdirectories. From a UX perspective at least, we want a page to look like: example.com/sectionA/subsectionAA/page1 but currently it's example.com/page1 We have dozens and dozens of these examples. To complicate matters a little further, Sections B and C have been earmarked to be consolidated into a new section (D), as they're currently confusing and overlapping, and create roadblocks in user journeys. So a page that is, say: example.com/sectionB/page2 may well want to be: example.com/sectionD/subsectionDA/page2 I'm comfortable enough with technically doing this, as I'm experienced enough in Drupal and have an agency on hand too, BUT - I don't know if there are any SEO pitfalls I need to be wary of when I'm doing this, beyond resubmitting sitemaps, and the trickle-down effects of redirects. Any advice, wise forum? thanks!
On-Page Optimization | | joberts0 -
URL structure of the page: Does this one need to contain the most important keyword for better SEO?
Hi everyone, I’m trying to get "air-conditioner-repair.html" to rank higher for the keyword "air conditioner los angeles". I am wondering whether or not I should change URL to "air-conditioner-los-angeles-repair.html" to get better results? Will be thankful very much for any advise you can offer!
On-Page Optimization | | kirupa0 -
Long url links
Just wondering about creating links.
On-Page Optimization | | Robotnik
Is it ok to have very long links?
Like: http://www.robotnik.com/computer-hardware-ram/8gb-ddr3-1600-desktop Is the above too long, is it better for SEO to be more to the point? Also For better SEO, is it better to use hyphens in a domain name or not?0 -
Redirects for new site new urls?
If redoing a site and updating some of the url's for SEO should you do permanent redirects for the old sites url's ? Using WordPress. I saw that the Yoast Pro plugin allows you to do this inside WordPress , is this the best way? Suggestions.? I know there are old articles written out on the web pointing back to the what will be soon old url's so just wondering what's the best way to go about this. Thanks Scott
On-Page Optimization | | scott3150 -
Backlink URL: With or Without WWW?
When it comes to backlinks. Does it matter with or without WWW? For example my website is without WWW and I backlink with WWW, will it still affect my website rank?
On-Page Optimization | | Japracool0 -
Neglected Blog SEO help
I am wedding & sports photographer in San Antonio. I've been busy with photographing sports (lots of them) & totally neglected SEO work for nearly 2 years. I know it's a broad question but what is the best way to get back on track? Should I create a strong landing page with keyword wedding photographer? Should i make separate websites - one for weddings, one for sports? Is PPC good way to jump start? Do I have website structure problems etc? If anyone can comment, that would be great. I am willing to hire SEO experts so if anyone knows anybody, please let me know My website is www.soobumimphotography.com Thank you in advance
On-Page Optimization | | soobumim0 -
Canonical URLs and SEO
After publishing my new wordpress website my on page analysis shows two canonical urls on my homepage. In checking the source code the Yoast SEO plugin states my canoncial url is www.homepage.ca/ This is the only one showing. Having said this I do not add the trailing slash to anything on my url structure. Could this be why the on page analysis tool says there are 2? If so is there any way to resolve this?
On-Page Optimization | | casper4340