homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
How Should I Structure My URL?
spoofee




msg:4599611
 1:23 am on Aug 6, 2013 (gmt 0)

I'm having the hardest time deciding how to structure my URL for the best SEO.

Basically, I have a deal that I want crawled.

The article is about "How to get 50% blue widgets."
The 732226 is so I can identify which article to pull up, but if it's better to remove it.. I can do so.

1. http://www.example.com/deals/How-to-get-50-off-blue-widgets/732226
(I read on the Google SEO doc that it's good to have a subfolder)

2. http://www.example.com/How-to-get-50-off-blue-widgets/deals/732226
(Amazon and Bestbuy has it this structure, but they may be a special case)

3. http://www.example.com/deals/How-to-get-50-off-blue-widgets_732226

4. None of the above

Any advice would be appreciated

[edited by: bill at 3:01 am (utc) on Aug 6, 2013]
[edit reason] use example.com - use "widgets" for keywords [/edit]

 

spoofee




msg:4599622
 3:32 am on Aug 6, 2013 (gmt 0)

Thanks bill for the edit

lucy24




msg:4599630
 5:08 am on Aug 6, 2013 (gmt 0)

Honestly there's not enough of a difference to bother about. Do whatever is easiest for you to code. If you can make a workable URL without a fistful of numbers (your 732226 here), then definitely do that.

I read on the Google SEO doc that it's good to have a subfolder

? Whether that's true or not-- and whether you've interpreted it correctly or not-- it's irrelevant here because all your permutations already have at least two pseudo-directory nests. The question seems to be what order to put them in.

I say "pseudo-directory" assuming that none of these configurations represent a real physical file. But there's not much sense in having a directory that contains only one subdirectory.

Putting /deals/ first implies more than one article on the theme of "deals". Putting /How-to-get-etcetera/ first implies you'll be covering more than one aspect of how-to-get.

Second assumption is this one article exists in a perfect vacuum. But really it's connected to an existing site, isn't it? Where is it most logically linked from? If it's an offshoot of any existing page, then its URL should reflect that. If it links primarily from the front page, then what are all the extra directories for?

phranque




msg:4600164
 11:46 pm on Aug 7, 2013 (gmt 0)

welcome to WebmasterWorld, spoofee!


I would avoid using underscores as word separators in urls.
I would also avoid mixed case in url paths as in your title slug.

you should concern yourself with url canonicalization when relying on a unique identifier in the url.
if an arbitrary title slug in the url yields a 200 OK you have a problem.

g1smd




msg:4600217
 6:26 am on Aug 8, 2013 (gmt 0)

I avoid "fake folder levels that are meaningless".

You have this URL:
http://www.example.com/deals/How-to-get-50-off-blue-widgets/732226

The final folder level implies that you might have other valid URLs like:
http://www.example.com/deals/How-to-get-50-off-blue-widgets/123456
http://www.example.com/deals/How-to-get-50-off-blue-widgets/654321
http://www.example.com/deals/How-to-get-50-off-blue-widgets/482935
which will also be valid.

I prefer the number at the front.
I use all lower case.
I never use underscores as separators.

I don't know the structure of the rest of the site, but I would likely change the deals folder to a 'd' prefix (and other folders to similar 1 or 2 letter prefixes):
http://www.example.com/d732226-how-to-get-50-off-blue-widgets

The 'd' prefix is used to quickly match the correct rewrite (and quickly reject the others, at the first character). The number and the words are then extracted and passed to the PHP script. The PHP script must look in the database to see if record 732226 exists. If it does not exist, send 404 HEADER and "include" the HTML file with the human-readable error message. If 732226 exists in the database, extract the "name" from the database and compare it with the requested name. If it is not an exact match, send a 301 HEADER and redirect to the correct URL (using the requested number and the name as extracted from the database). If the requested name does match the requested number, serve the content.

The above technical steps are vital. They prevent Duplicate Content issues and avoid the site being flagged for "soft 404" problems.

The front-loaded number also allows corrupted URL requests such as
http://www.example.com/d732226-how-to-get-50-otrert5y65widgertfcvgybhunjimhbgvf
and shortened URL requests such as
http://www.example.com/d732226-how-t
to be processed, redirecting to the correct URL.

Indeed, you effectively also have your own URL shortener and can post URLs such as
http://example.com/d732226
elsewhere knowing they will work just fine, redirecting to the correct URL.

You'll run into many people that say "put the number at the end, you need the words first for 'better SEO'". I don't believe it makes all that much difference. However, having the numbers at the front leads to better rewrite efficiency (faster pattern matching) and better functionality (redirecting corrupted and shortened URLs).

This topic has come up several times so far this month. There may be additional useful details in those other threads.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved