Forum Moderators: open

Message Too Old, No Replies

Adding % as first character in keywords?

What's the significance?

         

jimshu79

4:07 pm on Apr 15, 2004 (gmt 0)

10+ Year Member



I saw someone's meta keyword list:

<META NAME="keywords" CONTENT="%widget, blue widgets, red widgets........etc"

Why use the %? Its on every page...

Sanenet

4:26 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Was it ASP? Might have been a mistake with the code!

john_k

4:29 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is that it is done on purpose and that they are attempting a form of sql injection. The "%" character is used as a wildcard in SQL.

I would be surprised if it works, but interested to find out for sure.

Sanenet

4:30 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



John_D; How would that work? Unless I'm missing something, surely the code would have been parsed before making it into the HTML?

john_k

4:32 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I mean it is for the spider and indexing process. If in fact it is done on purpose, then they are probably trying to see what happens when a spider's indexing process doesn't handle the "%" character.

Sanenet

4:37 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The things some people do for fun, eh?

john_k

4:46 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To elaborate a little more: The "%" character is used as a wildcard when doing queries in SQL.

So, if an indexing process were to read the meta-tag and NOT properly react to a "%" character, then, depending upon how they index pages, you might effectively get the page linked to EVERY word that is being indexed (EVERY as in all words appearing on all pages on every website being indexed).

This is a simplified example:
Assume an index that maintains a list of all individual keywords. With each keyword, there is a list of all URLs that contain the keyword.

If the indexing process reads a keyword like "%widget" and then tries to add your URL to the list, AND the code doesn't handle the "%" character, then it may try to add the URL with something like this (pseudo-code):

Add "http://example.com/trickymetatags.htm" to the URL list where keyword LIKE "%widget"

There are a lot of if-s in the above description, and the real-world process is much more complex. So I doubt that it would actually work - but you never know unless you look at the code.

john_k

4:51 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



btw - jimshu79 - is there a space between the "%" and "widget"?

If not, then apply my above description, but scale it down such that it would affect all keywords that end with the letters "widget"

If there is, then the example applies except that where I wrote LIKE "%widget it should be LIKE "%"

jimshu79

4:58 pm on Apr 15, 2004 (gmt 0)

10+ Year Member



Ok after checking again...I noticed that the first keyword is the same as the title.

example:

<title>jimshu79 likes webmasterworld - widgets.com</title>

<META NAME="keywords" CONTENT="%jimshu79 likes webmasterworld - widgets.com, keyword, keyword, keyword....etc

and no...there is no space between the % and the first keyword...

Sanenet

5:08 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So, could be a coding error:

Say the chappie did a global search and replace, and managed to insert either two % signs, or put a % in by error... Or, John's SQL example.

Either way, my vote is that it's botched code.

jimshu79

5:18 pm on Apr 15, 2004 (gmt 0)

10+ Year Member



hmmm...the strange thing is that he gets good SERPS on all the pages =)

john_k

5:20 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



my vote is that it's botched code

That would definitely make more sense.

john_k

5:23 pm on Apr 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



strange thing is that he gets good SERPS on all the pages

I would be very surprised if the indexing process doesn't simply strip such characters out. Their good rankings are likely due to other factors.

jimshu79

5:27 pm on Apr 15, 2004 (gmt 0)

10+ Year Member



cool guys, thanks for the help!