Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've got my URL however some of the strings would contain &. Obviously I can't use them as best practice so I've replaced them with +.

However if I encoded my & instead it would become %26.

How would a search engine see that? Would it see %26 as a & so still bring back the URL or would it just see it as a %26?

ie.

Would www.example.com/sweet?m&m show as that, or would they see it as www.example.com/sweet?m%26m

share|improve this question
add comment

1 Answer

Always use the URL encoded %26 if you must have an ampersand in the url. If you use the un-escaped m&m in a querystring, your server is going to see this as 2 empty "m" GET variables, the 2nd of which will overwrite the first. I don't know about IIS, but on a PHP/Apache server you will wind up with this:

using PHP's var_dump($_GET);:

?m%26m:

array
  'm&m' => string '' (length=0)

?m&m:

array
  'm' => string '' (length=0)

Google is smart enough to decode escaped urls, and none of your SEO matters if your querystrings in you links are broken ;)

share|improve this answer
    
In regards to "Google is smart enough to decode escaped urls" - I certainly believe it, but by chance would you have any reference for this or maybe a link to another post here that supports your conclusion? –  Wesley Murch Oct 8 '12 at 16:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.