Should I shorten my urls?
-
For my informational site I have a lot of urls that are way too long. When I first created the site, I wrote a script that takes out the common words of a post and fashions a url. So, for example, if the first few words of a question were:
Hi there, I have a question about back pain. I'm wondering what drugs would be good for relief and how I can get some help?
then my url may be:
www.mydomain.com/question?id=123-question-back-pain-wondering-drugs-good-relief-how-get-some-help
Once I got learning about seo I realized that these urls were too long but I never did anything about them. Should I be shortening these, or is my time best spent doing something else?
-
That is brilliant Marcus. The if-else idea regarding the ID makes so much sense. I will leave the old ones as is and change the ones from this point on.
Thanks!
p.s. I noticed that seomoz does the same thing with the Q&A urls. This one's not too long because I asked a short question but some of the question urls in here are quite long!
-
Hey
That's a solid point from EGOL - if there are ones that are working well at the moment, don't rock the boat and look to improve new content. The dynamic thing does make it a bit more tricky but really, it should not be a massive problem.
If your URLs are generated by the script and you have some kind of ID relating to the content you are adding it should be easy enough to put something in place that uses better quality URLs for new content.
If contentID > x Then
Build new URL Structure
Else
Build old URL Structure
End
Whether you do this entirely in the code or with some URL rewriting to add polish is up to you and in some part depends on how things work on your back end but...
Where there is a will there is a way and if you can shorten future URLs it will provide some benefit.
Maybe you could do some testing to see if it is going to be worth your while
- Create a few hard coded new pages over the next month
- Track them against the current pages
- see if there is a statistical improvement in clicks, conversions, impressions etc
I am pretty much of the opinion that if you can change them going forward, you should as they are not brilliant at the moment but I would not expect miracles from this though so don't bust a blood vessel over it.
Cheers
Marcus -
You could definitely redirect URLs using .htaccess and mod_rewrite. An example rule would be something like
RewriteRule ^q/(.*) /?question=$1
or
RewriteRule ^q/(.*)-(\d+) /?question=$2-$1
See the mod_rewrite documentation or just ask a competent developer about the rules above.
-
I definitely agree with the "messy" thing. Every few months I think, "Oh, I should fix that long url thingy", but then my brain gets shorted out trying to think of how to do it. I wanted to do a htaccess redirect but because the url is written with a php script I just can't figure out how to do it.
Invariably what happens is that I manage to get my mind onto other more exciting things and then I just do nothing and I end up having more and more ugly long urls.
-
ahh... this question is getting messy...
I don't know exactly how the rel-canonical tag will work in this situation.
-
Thanks guys. One of my problems is that all of these urls are generated dynamically. So, I'm thinking of changing the script on that page so that it generates a shorter url. Then, I think I can use the rel-canonical tag to tell Google that the short urls are the ones to use.
If I do that will the long ones drop out of the index?
-
If you can change future URLs without changing the historic URLs then I would leave the old ones "as is". (Meaning... change future but not old ones)
It will take work to change them and if you do a 301 then there might be some link power lost.
I always like to base my decisions at least in part on analytics, so if these pages are pulling nice traffic and ranking in the SERPs then I would not do a thing about the old ones.
Just an opinion.
-
Hey, they are too long and don't really make any sense so... I think they need improving.
In an ideal world your URL should describe the content of the page as it will help win clicks and may give you an SEO boost through links that use the URL itself as the anchor.
Shorten them though, should be easy enough and certainly gives a usability boost.
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
-
Automatically check if URL has been optimised?
Hi guys, I have a massive list of URLs and want to check if the primary keyword for each URL has been optimised. I'm looking for something similar to Moz on-page grader which grades the URL and primary keyword with a single metric e.g. grade a, b, c However, Moz doesn't offer an API to pull this score automatically. I was wondering does anyone know of any tools which you can access their API to do something like this? Cheers.
Intermediate & Advanced SEO | | jayoliverwright0 -
Migrating From Parameter-Driven URL's to 'SEO Friendly URL's (Slugs)
Hi all, hope you're all good and having a wonderful Friday morning. At the moment we have over 20,000+ live products on our ecomms site, however, all of the products are using non-seo friendly URL's (/product?p=1738 etc) and we're looking at deploying SEO friendly url's such as (/product/this-is-product-one) etc. As you could imagine, making such a change on a big ecomms site will be a difficult task and we will have to take on A LOT of content changes, href-lang changes, affiliate link tests and a big 301 task. I'm trying to get some analysis together to pitch the Tech guys, but it's difficult, I do understand that this change has it's benefits for SEO, usability and CTR - but I need some more info. Keywords in the slugs - what is it's actual SEO weight? Has anyone here recently converted from using parameter based URL's to keyword-based slugs and seen results? Also, what are the best ways of deploying this? Add a canonical and 301? All comments greatly appreciated! Brett
Intermediate & Advanced SEO | | Brett-S0 -
Linking to URLs With Hash (#) in Them
How does link juice flow when linking to URLs with the hash tag in them? If I link to this page, which generates a pop-over on my homepage that gives info about my special offer, where will the link juice go to? homepage.com/#specialoffer Will the link juice go to the homepage? Will it go nowhere? Will it go to the hash URL above? I'd like to publish an annual/evergreen sort of offer that will generate lots of links. And instead of driving those links to homepage.com/offer, I was hoping to get that link juice to flow to the homepage, or maybe even a product page, instead. And just updating the pop over information each year as the offer changes. I've seen competitors do it this way but wanted to see what the community here things in terms of linking to URLs with the hash tag in them. Can also be a use case for using hash tags in URLs for tracking purposes maybe?
Intermediate & Advanced SEO | | MiguelSalcido0 -
Massive URL blockage by robots.txt
Hello people, In May there has been a dramatic increase in blocked URLs by robots.txt, even though we don't have so many URLs or crawl errors. You can view the attachment to see how it went up. The thing is the company hasn't touched the text file since 2012. What might be causing the problem? Can this result any penalties? Can indexation be lowered because of this? ?di=1113766463681
Intermediate & Advanced SEO | | moneywise_test0 -
More Indexed Pages than URLs on site.
According to webmaster tools, the number of pages indexed by Google on my site doubled yesterday (gone from 150K to 450K). Usually I would be jumping for joy but now I have more indexed pages than actual pages on my site. I have checked for duplicate URLs pointing to the same product page but can't see any, pagination in category pages doesn't seem to be indexed nor does parameterisation in URLs from advanced filtration. Using the site: operator we get a different result on google.com (450K) to google.co.uk (150K). Anyone got any ideas?
Intermediate & Advanced SEO | | DavidLenehan0 -
How to fix duplicated urls
I have an issue with duplicated pages. Should I use cannonical tag and if so, how? Or should change the page titles? This is causing my pages to compete with each other in the SERPs. 'Paradisus All Inclusive Luxury Resorts - Book your stay at Paradisus Resorts' is also used on http://www.paradisus.com/booking-template.php | http://www.paradisus.com/booking-template.php?codigoHotel=5889 line 9 | | http://www.paradisus.com/booking-template.php?codigoHotel=5891 line 9 | | http://www.paradisus.com/booking-template.php?codigoHotel=5910 line 9 | | http://www.paradisus.com/booking-template.php?codigoHotel=5911 line 9 |
Intermediate & Advanced SEO | | Melia0 -
Url with hypen or.co?
Given a choice, for your #1 keyword, would you pick a .com with one or two hypens? (chicago-real-estate.com) or a .co with the full name as the url (chicagorealestate.co)? Is there an accepted best practice regarding hypenated urls and/or decent results regarding the effectiveness of the.co? Thank you in advance!
Intermediate & Advanced SEO | | joechicago0 -
Htaccess Redirect with %C2%A0 in URL
Below is my setup for redirects in .htaccess file in my root word press installation. The www to non-www works well, so no problems there Other page redirects work well, too (example: redirect 301 /some-page/ http://mysite.com/another-page/ (I didn't post those because I have a few too many : ) So here it goes... RewriteEngine On
Intermediate & Advanced SEO | | pepsimoz
RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L] BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress redirect 301 /archives/10-college- majors/ http://mysite.com/archives/10-college-majors/ redirect 301 /archives/10-college-%20majors/ http://mysite.com/archives/10-college-majors/ redirect 301 /archives/10-college-%C2%A0majors/ http://mysite.com/archives/10-college-majors/ I'm having a problem with the last 301 redirect: redirect 301 /archives/10-college-%C2%A0majors/ http://mysite.com/archives/10-college-majors/ not working... As you can see I've tried using other varations of the "space" but no go. I also used a redirect in cPanel's Redirect screen; testing all the possible options + wildcard I've also tried this: http://serverfault.com/questions/201829/using-special-characters-in-apache-mod-rewrite-rule (perhaps unsuccessfully, because it caused a 500 server error and it's a different situation in my case) I also saw something here: http://www.webmasterworld.com/apache/3908682.htm but I don't know if it works and how I would implement that + do so without compromising ALL other redirects. Note: the URL displays with a space in the address bar of all major web browsers: http://mysite.com/10-college- majors/ and goes to a 404 page I have a goregous page / PR6 / high authority site linking to the URL on my site, but they copied the URL with a space somehow. I contacted the person responsible for the website and he claims it works fine (aka he didn't check it). Is there a clean way to redirect ONLY this problematic URL without compromising other redirects, etc? Any ideas would be great. I'll respond with progress. Thanks in advance. UPDATE the redirect works, and it did work. Even so, when looking at source of page linking to mine, the URL looks like this: ``` http://mysite.com/archives/10-college- majors/ Clicking the URL in Source View in FireFox takes me to ``` http://mysite.com/archives/10-college-%C2%A0majors/ none of my 301 redirects should direct there. I don't have any redirect plugins either.0