Developer comments in code & SEO
-
A client of mine has provided an SEO report that states:-
"The inclusion of comments by developers in the coe is common practice.....
....its is not positive to leave large blocks of code in the site as makes crawling difficult to crawl"
Im thinking that this has no SEO import at all, any one come across this?
Thanks
z
-
I dont use comments either, i like to see nice easy to read html
-
Developer comments would not survive on one of my sites.
-
Some developers over use comments and can make the file larger and slower, also push content too far down the page.
It can stuff up crawling depending what is in the comments.
I dont believe in minifying code so it can not be easaly read and debuged, but on the other hand you should try to keep code clean as posible, dont use comments if they are not really needed.
-
As a web application developer, I liberally use inline comments (code at the header and inline with code). It's a key to maintaining the code over long periods of time (we forget what we did and why) and across teams (somebody else may need to update code I originally wrote).
That said, I use comments surrounded with tags that do not end up in the HTML code rendered to a visitor. Most languages that "create" HTML code as output (ColdFusion, PHP, etc) usually have tags so comments can be used without being seen in the HTML.
In my opinion, this is the way to go.
Neil, you're probably concerned with the comments in HTML comment tags. I cannot help you there. For those of you who can suggest best practices to site owners and developers, ask that whenever possible inline comments are in tags that **do not show up in final HTML. **
Also, as a practice, I do not want the World seeing (or reverse-engineering) my code based on my comments. Use them as a web developer yet hide comments in output so SEOs do not have headaches of wondering how it affects rankings/page performance.
I hope that helps.
-
Thanks, just a file size issue then. Sorry the image is taken from SEOmoz as an example.
-
The comments you highlighted are actually Internet Explorer conditionals used to give different versions of IE different style sheets. I don't think there's any SEO problem here. (Although I recognise this isn't your site)
Removing them may cause you problems with the layout/style of your site.
-
Comments visible in HTML code do increase the file size, but assuming these blocks of code are of a reasonably normal size, that shouldn't be a problem. Search engines ignore everything that is commented out (mainly because it would make gaming the system so easy).
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Are Wildcard Subdomain Hurting my SEO?
I have some sites with a lot of categories (category, sub-category, sub-subcategory) and locations (country, state/territory, city). To avoid listing pages really deep in my hierarchy I used wildcard subdomains for the locations, but lately I have been told that might be hurting my overall SEO efforts. I have a lot of URLs like https://city-state-country.example.com on one side of the domain and example.com/category/subcategory/subsubcategory on the other. In the middle you see stuff like city-state-country.example.com/category/subcategory/subsubcategory and everything in between. Would I be better off moving the locations to the right side of the domain name? Then you might find stuff like example.com/country/state/city/category/subcategory/subsubcategory and everything in between. I think I could do the new rewrite rules fairly easily since every country slug is just two characters long.
On-Page Optimization | | PostAlmostAnything0 -
HTTPS, free certificates and Google seo
As we all know, Google decided to give some weight in rankings to encrypted sites. SSL certificate providers are quite a lot out there, but there is also a free alternative (Let’s Encrypt). I've been going over some of these services and compared Godaddy's and the above certificates, and there isn't much of a difference. The question is: using a free certificate would have the same effect as a paid one? I would rather pay for one than be punished for using a free one, but free would be good too.
On-Page Optimization | | anitawapa
What's your take on this? Thank you0 -
Is Disqus as good for SEO as a built in comment system on your website?
Disqus is a simple tool you can use to easily get comments up and running on your website. Does it have the same value as a built in comment feature such as a Wordpress blog or does Google not attribute the Disqus comments to the websites content as it would for Wordpress?
On-Page Optimization | | Trellis0 -
Using Escaped Fragments with SEO
Our e-commerce platform is in the process of changing to what we call app based stores (essentially running in a browser as single page web-app) With these new stores they are being built in HTML 5 and using escaped fragments.
On-Page Optimization | | marketing_zoovy.com
Currently merchants are usually running 2 stores until we launch to app site at 100%. My questions are really concerning the app stores which right now show on a subdomain but will essentially take over the primary domain. Here is an example:
app.tikimater.com and app.sportsworld.com Since I am not a developer, I'm really having a hard time understanding the escaped fragments. I'm using this but https://developers.google.com/webmasters/ajax-crawling/docs/getting-started I'm not sure what my actual urls should look like and what the canonical should be set to. Right now they have been removed but previously they had http:app.tikimaster.com#!v=1 Also, and how I should be setting up my meta information for Google so 1) pages are indexed timely 2) pages are indexed with the correct information. I am still setting the meta titles and descriptions but in some instances Google uses other info. With the new platform we are moving away from on page content (written paragraphs) but category pages would have related products embedded. Should I still be pushing to have some type of intro text, since it would solely be for SEO and not the shoppers experience. All product pages have content (product description etc) Thank you for any advice0 -
W3C code errors
HI GUYS I tried to check my website http://musicanueva.es with W3C but I have 1 problem to fix (here is an image: http://www.imagebam.com/image/cc1a3b275215931) any idea to fix this issue??? don't know what to doooo
On-Page Optimization | | direttore20 -
SEOmoz and Wordpress SEO plugin
I made a lot of changes with Wordpress SEO by Yoast before I signed up with SEOmoz. But SEOmoz doesn't seem to see those changes. I am still being told I have multiple meta descriptions. I don't know why but SEOmoz is seeing the default meta description and not the one I wrote using the Yoast plugin. How can I get SEOmoz to see those changes? Edit: Google has not updated all the changes I made with Wordpress SEO.
On-Page Optimization | | dealblogger0 -
Footer and SEO
Hi All... We have a client who wants to really minimize and simply their website. They want to remove some of the footer info. Obviously we do not want to remove any contact or address but they would like to remove the footer menu system. I have read various things about it NOT effecting SEO and that it is there for user navigation and usability. Thoughts? Opinions? zach
On-Page Optimization | | Group20 -
Maximum length of a URL for good SEO?
Hi there, We have a content database as part of our site and I noticed that the way the database is loaded with new content, it means that the URL’s for these pages are really long, around 100 characters or sometimes more http://www.xxxyy.org/knowledge-base/documents/word1-word2-word3-word4-word5-word6-word7-word8 Is there a suggted maximum character length for a URL? Kind of like for title tag where I max out at 69… Should I truncate the URL’s or at least reduce the numbers of words in them to something less spammy? Does that make a difference? Thanks!
On-Page Optimization | | inhouseninja0