How can I declare Doctype on my web pages for better SEO?

Vvel
Explorer
121 2 12

Had an seo report saying that alot of my pages dont have doctype declared? How do i fix this? Do i put <doctype > html5<doctype/)

Replies 7 (7)

Not applicable

Hi @Vvel 

Aibek is here from Speedimize.io

Usually the doctype is declared by default. In any case, you can specify as below in theme.liquid.

https://www.w3schools.com/tags/tag_doctype.asp

In short, at the beginning of theme.liquid, write:

<!DOCTYPE html>

Vvel
Explorer
121 2 12

I know how add it but I  don't know what specific file to put it in. My report says 87 pages dont have it. Homepage, collections,  blogs, and pages.

Not applicable

Can you share with us URL of your shop? 

 

So we can check this and find solution for you. 

 

Vvel
Explorer
121 2 12

inniti wear dot com

Not applicable

Hey @Vvel 

https://prnt.sc/126twcu -doctype not specified. Usually, in each theme, the doctype is specified at the beginning of theme.liquid. At the very beginning of the theme.liquid doctype is not registered.

theme.liquid is a global layout. Enter the doctype in this file.

If you wish, we can help you with this. 

We can send you request via Shopify Partners. 

Vvel
Explorer
121 2 12

<!doctype html> is has already been there.

this is what the couple of first lines look like...

{% render 'breadcrumbs' %}
{% capture content %}
<!DOCTYPE html>
<html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="{{ shop.locale }}"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="{{ shop.locale }}"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="{{ shop.locale }}"> <![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="{{ shop.locale }}"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html lang="{{ shop.locale }}"> <!--<![endif]-->
<head>
<!-- Added by AVADA SEO Suite -->
{% include 'avada-seo' %}
<!-- /Added by AVADA SEO Suite -->

<meta name="google-site-verification" content="3D5I-_AxcVOTa5N8-Aa80SFKTQxzl3GkWsFxoD68G0M" />
<meta charset="utf-8">
<meta http-equiv="cleartype" content="on">
<meta name="robots" content="index,follow">

kub
Pathfinder
118 2 43

Hi. Did you solve this? i also get message that doctype is not declared but i have in my theme.liquid and it is also in source code of page visible