I run a blog on programming topics and often post large amounts of source code, with syntax highlighter.

This source code often has few terms repeated multiple times like "printf" or "alert" or anything depending on the language.

Does this spoil the seo ??

The keyword density is definitely affected.

1 Answer 1


I publish lots of source code on my website. Google still sends traffic to it.

I tend to limit the amount of code that I embed in a blog post to about 20 lines. Usually it is example "how to use this" type of code. For longer programs, I tend to create a new page and link to it. I'm not sure that that practice helps with SEO, but it seems to make the site more readable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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