homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

How Should I Structure My URL?

Msg#: 4599609 posted 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]



Msg#: 4599609 posted 3:32 am on Aug 6, 2013 (gmt 0)

Thanks bill for the edit


WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4599609 posted 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?


WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4599609 posted 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.


WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4599609 posted 6:26 am on Aug 8, 2013 (gmt 0)

I avoid "fake folder levels that are meaningless".

You have this URL:

The final folder level implies that you might have other valid URLs like:
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):

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
and shortened URL requests such as
to be processed, redirecting to the correct URL.

Indeed, you effectively also have your own URL shortener and can post URLs such as
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