Welcome to WebmasterWorld Guest from 54.163.35.238

Message Too Old, No Replies

Using ampersand in querystrings

     

Chris_H

9:22 am on Aug 5, 2006 (gmt 0)

10+ Year Member



Stupidly, I've been using the character '&' in my querystrings, e.g.

www.mysite.com?widget=blue&type=1

HTML validation fails as I am not using '&' instead of '&', and I am keen to correct this.

However, if I go ahead and fix these querystrings would it cause any problems with currently indexed pages? Would I suffer duplicate content due to having to differing URL's in the index:

www.mysite.com?widget=blue&type=1

and

www.mysite.com?widget=blue&type=1

Thanks, in advance.

tedster

4:57 pm on Aug 6, 2006 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I just did two google searches: allinurl:& and allinurl:&

The first search returns zero results. The second search returns 672 million results, and every one of them has & in the uri, despite the fact that an explicit search generates zero results. So it looks to me that Google is right on top of this, and the two versions of the uri are clearly not seen as duplicates. Rather, everything seems to be mapped to the & version.

Chris_H

5:53 pm on Aug 6, 2006 (gmt 0)

10+ Year Member



Thanks Tedster. This gives me the confidence to amend the URLs and go and get properly validated.

Chris

jomaxx

6:53 pm on Aug 6, 2006 (gmt 0)

WebmasterWorld Senior Member jomaxx is a WebmasterWorld Top Contributor of All Time 10+ Year Member



That might be an artifact of the allinurl: function. I agree that "&" and "&ampl:" are normally interchangeable, but they are distinct URLs that could theoretically produce different results. Like "www" and non-"www" domain addressing, for example.

Chris_H

8:50 pm on Aug 6, 2006 (gmt 0)

10+ Year Member



I must admit I haven't experienced any problems with the XML sitemap, which forces you to use & even though the website in question (until today) used '&' in the querystring.

Naturally I was nervous when going ahead and changing all the links to & today.

I can only cross my fingers and hope.

Does anyone else have any experience or thoughts about this?

g1smd

10:25 pm on Aug 6, 2006 (gmt 0)

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



Links with & are fine on a browser for sure. The browser knows to request a URL with just an & in it from the webserver, and not to try to find a character to draw on the screen called &productid; or &pagenumber; or something.

Look in your raw log files and see that even though the link has & in it, that the browser requests a URL as if it just has a & when the request hits the server.

Chris_H

7:24 am on Aug 7, 2006 (gmt 0)

10+ Year Member



Good thinking. I'll go and have a look at my logs to confirm this.

Chris_H

7:27 am on Aug 7, 2006 (gmt 0)

10+ Year Member



You're absolutely right. My log files confirm this. I can now rest easy.

Thanks to everyone for your help.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month