Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Google webmaster tools shows wrong keywords for my site.

For example, it shows

public_html

php

include_once

and many more irrelevant keywords. Dont know why it's looking at the code.

I am unable to figure out why.

Any help is appreciated.

share|improve this question
@Trott I dont understand the negative rating to this question. You should have added a comment as to why you think so. – Van de Graff Aug 30 '11 at 6:17
I'm not 100% certain I'm the one that downvoted it, but I certainly did edit it to remove some ALL CAPS and a few other minor changes. And I did flag it as off topic and suggested it be migrated to the webmasters StackExchange. Now that that's happened, it's closed on StackOverflow and it does not appear that I had downvoted the question, but that may be an artifact of the question being closed. I concede that the question is not egregious, just off topic (for StackOVerflow, where I'd be leaving this comment if the question were not closed, which means comments are no longer allowed). – Trott Aug 30 '11 at 12:19

migrated from stackoverflow.com Aug 30 '11 at 7:06

1 Answer

up vote 4 down vote accepted

Google can't read your PHP code. It can only read the output of your web server. So your server must be spitting out PHP code somewhere.

If your site is functioning normally, then the most likely place for this to happen is on an error page, or 404 page. What happens if you type in a non-existent URL? Do you see an error page that includes some of the keywords above?

What happens if you search your site for some of those keywords? Which page is returned?

e.g. site:yoursite.com public_html

share|improve this answer
2  
Also something to keep in mind: if some underlying condition causes PHP to error out sporadically (i.e. not necessarily on every request) and PHP is set to display errors, it is very possible that Google is indexing content like "Error on line 520 in file /public_html/index.php: include_once(...)" - check your error logs. – danlefree Aug 31 '11 at 0:30

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.