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
-
How Does Yelp Create URLs?
Hi all, How does Yelp (or other sites) go about creating URLs for just about every service and city possible ending with the search? in the URL like this https://www.yelp.com/search?cflt=chiropractors&find_loc=West+Palm+Beach%2C+FL. They clearly aren't creating all of these pages, so how do you go about setting a meta title/optimization formula that allows these pages to exist AND to be crawled by search engines and indexed?
Intermediate & Advanced SEO | | RickyShockley0 -
Link juice through URL parameters
Hi guys, hope you had a fantastic bank holiday weekend. Quick question re URL parameters, I understand that links which pass through an affiliate URL parameter aren't taken into consideration when passing link juice through one site to another. However, when a link contains a tracking URL parameter (let's say gclid=), does link juice get passed through? We have a number of external links pointing to our main site, however, they are linking directly to a unique tracking parameter. I'm just curious to know about this. Thanks, Brett
Intermediate & Advanced SEO | | Brett-S0 -
Duplicate content on URL trailing slash
Hello, Some time ago, we accidentally made changes to our site which modified the way urls in links are generated. At once, trailing slashes were added to many urls (only in links). Links that used to send to
Intermediate & Advanced SEO | | yacpro13
example.com/webpage.html Were now linking to
example.com/webpage.html/ Urls in the xml sitemap remained unchanged (no trailing slash). We started noticing duplicate content (because our site renders the same page with or without the trailing shash). We corrected the problematic php url function so that now, all links on the site link to a url without trailing slash. However, Google had time to index these pages. Is implementing 301 redirects required in this case?1 -
301 forwarding old urls to new urls - when should you update sitemap?
Hello Mozzers, If you are amending your urls - 301ing to new URLs - when in the process should you update your sitemap to reflect the new urls? I have heard some suggest you should submit a new sitemap alongside old sitemap to support indexing of new URLs, but I've no idea whether that advice is valid or not. Thanks in advance, Luke
Intermediate & Advanced SEO | | McTaggart0 -
Is there any SEO advantage to sharing links on twitter using google's url shortener goo.gl/
Hi is there any advantage to using <cite class="vurls">goo.gl/</cite> to shorten a URL for Twitter instead of other ones? I had a thought that <cite class="vurls">goo.gl/</cite> might allow google to track click throughs and hence judge popularity.
Intermediate & Advanced SEO | | S_Curtis0 -
Repeat name and location in URL or no ?
in this url www.stjeromemitsubishi.ca, is it a good thing to repeat the name and location in the url but with ''-''sign between? ex: www.stjeromemitsubishi.ca/partsandservice/stjerome-mitsubishi-contact.aspx
Intermediate & Advanced SEO | | DavidPilon0 -
Optimal URLs for SEO and UX
We are considering restructuring the URL scheme on one of the websites we maintain. We have a few options. Currently news article URLs are as follows:
Intermediate & Advanced SEO | | Peter264
http://domain.com/news/1234/article-title-name/ Download section URLs are as follows:
http://domain.com/downloads/files/1234/file-title-of-download-here/ Forum URLS:
http://forum.domain.com/forum/topic/1234/title-of-forum-topic-here/ We feel that these are a bit too long for both SEO and user experience. We want to remove as many directories from the URLs as possible. From experience, what do you recommend changing for the example URLs above? We have some ideas below...and we need to keep the ID in the URLs...however I know this is a little frustrating. Some ideas we have for news articles:
http://domain.com/news/article-title-shorter-1234
http://domain.com/article-title-shorter-n1234 Some ideas for the download pages:
http://domain.com/downloads/file-title-shorter-d1234
http://domain.com/downloads/files/file-title-shorter-1234
http://domain.com/file-title-shorter-d1234 Some ideas for the forum URLs:
http://forum.domain.com/topic-title-shorter-t1234
http://forum.domain.com/topic/topic-title-shorter-1234 What do you think of these suggestions? Any other URL ideas? Recommended URL length? The purpose of is question was to find the perfect URLs for the site we are working on; your thoughts, suggestions and tips are very much appreciated.0 -
URL for New Product
Hi, We run an established website (mindflash.com) selling online training software. We are getting ready to launch a new section of the site where our users can sell their own online training programs. This will be branded as the 'marketplace'. This section will have a main page, category pages, tag pages, search and individual course pages. In our URL structure, I'd love to target the word 'training courses' but I don't want to neglect the product brand either. Is it better to use /training-courses in the marketplace urls or to use /marketplace? Or is it better to use both like /marketplace-training-courses or /marketplace/training-courses? Option 1: Example main section page: mindflash.com/training-courses Example category page: mindflash.com/training-courses/software-training Option 2: Example main section page: mindflash.com/marketplace Example category page: mindflash.com/marketplace/software-training Option 3: Example main section page: mindflash.com/marketplace-training-courses Example category page: mindflash.com/marketplace-training-courses/software-training Option 4: Example main section page: mindflash.com/marketplace/training-courses Example category page: mindflash.com/marketplace/training-courses/software-training Which option is better and why?
Intermediate & Advanced SEO | | mindflash0