Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

%20 in Url String - Good, Bad or just Ugly?

Status
Not open for further replies.

EvilAsh

Technical User
Oct 22, 2005
56
GB
This question may prove to be threefold, so please bear with me!

Recently I have recoded my sites to include keywords in the url string as opposed to product id, i.e.


Code:
product.php?id=1234
becomes
Code:
product.php?product=shoes

The problem (if indeed it is a problem)is where there is more than one word in the product name, so the browser will render the url:

Code:
product.php?product=red%20shoes

My questions are:

1. Does the %20 in the rendered url "pollute" the keywords from an SEO perspective (as well as looking ugly!)?

2. If yes, would it be more advantageous to separate the words with a hyphen?

3. Is there a method of replacing the space between the words in MYSQL so I don't have to reopen each DB entry and do it by hand?

Thanks for reading. Any advice would be appreciated.
 
Well, as keywords in URLs have somewhere between zero and miniscule effect for SE ranking, what you are doing is pretty much wasted effort.

However, changing all your URIs on your site can cause a lot of issues for SE ranking, such as your pages disappearing from the SERPs for 3 to 4 months.

Answers:
1/ No (just look ugly)
2/ see above. But for aesthetics, Yes
3/ You could write a query and run it on the database, however it is much simpler to replace the spaces when you grab the data from the DB to create the URIs and replace the "-" with a space when you retrieve the data.



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 

I would sort the spaces to hyphens once on the database, then not worry about it:
Code:
Update myTable Set myColumn = replace (myColumn,' ','-')

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top