Why am I seeing an "Invalid Doctype" error on my site?

1 Missing DOCTYPE

2 Content before DOCTYPE

3 Quirks Mode DOCTYPE

If prompted with the "Invalid DOCTYPE" error, it is likely that the DOCTYPE in your site is missing or out of date. This causes Sumo to work improperly.

In order to troubleshoot this, check for the following three things:


Check to make sure a valid DOCTYPE is present within your site's source code. Without one, Sumo will not work properly on your site.

An example of a valid DOCTYPE is below:

<!DOCTYPE html>

Content before DOCTYPE

Without loading a proper DOCTYPE first, your browser doesn't know how to render your webpage and Sumo properly. Absolutely nothing can be placed before your DOCTYPE, including spaces.

Please be sure that all comments, scripts, code, links, anything, are all placed AFTER <html> and never before it or <!DOCTYPE HTML>.  Nothing can exist outside of your <html></html> tags except your <!DOCTYPE>.

Quirks Mode DOCTYPE

If you are using the DOCTYPE below, you will not be able to use Sumo properly:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

This DOCTYPE puts your browser into "Quirks Mode," and sets your browser to support older standards. More specifically, jQuery does not work correctly when a page is rendered in Quirks Mode.

In order to resolve this, change your DOCTYPE to the one below:

<!DOCTYPE html>

Here are a few resources regarding Quirks Mode

1 http://en.wikipedia.org/wiki/Document_type_declaration

2 http://www.w3schools.com/tags/tag_doctype.asp

3 http://www.w3.org/QA/Tips/Doctype

4 http://www.w3.org/QA/2002/04/valid-dtd-list.html

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.