Seo Cheat Sheet
Seo Cheat Sheet
Seo Cheat Sheet
Title Tag • Best between 50–60 characters 200 OK/Success Google Search Console
<head> • Important keywords near the beginning search.google.com/search-console/about
<title>Page Title</title> 301 Permanent redirect
</head> • Well-written descriptions infuence
click-through rates (CTR) Bing Webmaster Tools
302 Temporary redirect bing.com/toolbox/webmaster
Meta Description Tag • Best around 160 characters 404 Not ound
<head> • Each description should be unique Yandex
<meta name="description"
content="This is an example."> • Well-written descriptions infuence
410 Gone (permanently removed) webmaster.yandex.com
</head> click-through rates (CTR)
500 Server error
Image Link
<a href="https://www.example.com/web-
page.html"><img src="/img/keyword.jpg"
alt="description of image" height="50"
width="100"></a> “URLs” next page
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 1
URLs Best Practices
Common URL Elements • Choose shorter, human-readable URLs with descriptive keywords
h t t p s : // s t o r e . e x a m p l e . c o m / c a t e g o r y / k e y w o r d ? i d = 1 2 3 # t o p • Exclude dynamic parameters when possible (see “Canonicalization” and “Pagination”)
• When possible, place content on the same subdomain to preserve authority
1 2 3 4 5 6 7 8 Recommended: https://example.com/blog
Less ideal: https://blog.example.com
1. Protocol 2. Subdomain 3. Root domain 4. Top-level domain
5. Subolder/path 6. Page 7. Parameter 8. Named anchor
Robots.txt • Only Meta Robots and X-Robots-Tag remove For Robots.txt, Robots Meta Tags, and X-Robots-Tag:
Location: https://example.com/robots.txt URLs rom search results
• Googlebot (can be used as deault or most • Baiduspider
• Don’t block CSS or JavaScript les with Google crawlers)
User-agent: googlebot
robots.txt • FacebookExternalHit
Disallow: /example.html
• Googlebot-News
Sitemap: https://example.com/sitemap.xml • Applebot
• Googlebot-Image
More information at mz.cm/robotstxt • Slurp
• AdsBot-Google
• Twitterbot
• Mediapartners-Google (Mobile Adsense)
• Rogerbot
X-Robots-Tag Important Parameters or Mediapartners
Location: Sent in the HTTP headers • Dotbot
• Googlebot-Video
• Noindex (do not index)
• Wildcard or all robots: *
X-Robots-Tag: noindex • Bingbot
• Noollow (do not ollow links)
More information at mz.cm/x-robots • Yandexbot
• Noarchive (do not show cache)
...or combine (noindex, noollow)
Meta Robots
Location: In the HTML <head> If the robots <META> tag is not dened, the
deault is "INDEX, FOLLOW"
<meta name="robots" content="[PARAMETER]" />
Don’t block noindex URLs in robots.txt.
More information at mz.cm/x-robots They need to be crawled to be respected.
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 2
Sitemap Syntax Important Social Metadata
XML Sitemap Example: Default Location: Sample Meta Tag Template: "Article"
RSS and text sitemaps are also options https://example.com/sitemap.xml Place this data between the <head> tags of your website.
<?xml version="1.0" encoding="UTF-8"?> sitemap: parent tag for each sitemap <!-- Required Open Graph data -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <meta property="og:title" content="Developer's Cheat
<url> loc: location of the sitemap Sheet to SEO" />
<loc>http://www.example.com/foo.html</loc> <meta property="og:type" content="article" />
<lastmod>2019-06-04</lastmod> lastmod: the last modied date <meta property="og:image" content="https://example.
</url> com/image.jpg" />
</urlset>
* A sitemap cannot contain over 50,000 URLs.
<meta property="og:url" content="https://example.
com" />
Large websites should use multiple sitemaps <!-- Optional Open Graph data -->
listed under a single sitemap index le. <meta property="og:audio" content="https://example.
com/guide.mp3." />
<meta property="og:description" content="Description
Sitemap Index File Other Common Sitemap Types: here." />
<meta property="og:site_name" content="Your Site
<?xml version="1.0" encoding="UTF-8"?> Name, i.e. Moz" />
• Images <meta property="og:locale" content="en_us" />
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<meta property="og:video" content="https://example.
<sitemap> • Video
<loc>https://example.com/sitemap1.xml.gz</loc> com/guide.mp4" />
<lastmod>2019-01-01T18:23:17+00:00</lastmod> • News <meta property="fb:app_id" content="Your FB_APP_ID" />
</sitemap> <!-- Find additional markup on https://ogp.me -->
<sitemap>
<loc>https://example.com/sitemap2.xml.gz</loc>
* Don't orget to submit your sitemap to Google <!-- Twitter Card data -->
<lastmod>2019-01-01</lastmod>
via Google Search Console. <meta name="twitter:card" content="summary">
</sitemap> <meta name="twitter:site" content="@Moz">
</sitemapindex> <meta name="twitter:title" content="Title of content
(max 70 characters)">
<meta name="twitter:description" content="Descrip-
tion of content">
<meta name="twitter:image" content="https://example.
com/unique-image.jpg">
Mobile Best Practices
Best Practices
There are 3 ways to implement a mobile website: • Your mobile version should display the same content as your
desktop site
• Responsive web design (adjusts or screen size) • Page title tags & meta descriptions should remain the same Default to Open Graph
Platorms that support Open Graph protocol include Facebook,
• Dynamic serving (serves dierent content based on • Use the meta name="viewport" tag in the head o your page Twitter, LinkedIn, and Pinterest.
a user’s device) to tell the browser how to adjust the content.
Separate URLs (dierent URLs that serve mobile-optimized For example: <meta name="viewport" content= Optimal Image Sizing
content). Not advised. "width=device-width, initial-scale=1.0"> Twitter:
• Minimum 144x144 px
Check to see i your site is mobile-riendly: Increase speed by optimizing the critical rendering path, • No larger than 4096x4096 px or 5MB
mz.cm/mobile-friendly using HTTPS & HTTP/2, eliminating render-blocking resources,
removing unused CSS, and deerring oscreen images. Facebook:
• Minimum 600x600 px
More information at mz.cm/mobile-seo • Try to use images that are at least 1080 px in width
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 3
Rich Snippets and Structured Data
Enhance search results and help search engines understand your content.
SSL certicates are table stakes today. Your website must have one.
Reviews
Lighthouse (mz.cm/lighthouse) helps to identiy these vulnerabilities (and more) in the audit.
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Review",
"reviewBody": "The restaurant has great ambiance.",
"itemReviewed": {
"@type": "Restaurant",
"name": "Fine Dining Establishment"
},
"reviewRating": {
"@type": "Rating",
"ratingValue": 5,
"worstRating": 1,
"bestRating": 5,
"reviewAspect": "Ambiance"
}
}
</script>
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 4
Targeting Multiple Languages
Help search engines understand your location/language targets.
URL Structures for Country & Language Targeting Popular Languages Popular Regions
Sitemap Version
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://example.com/english/</loc>
<xhtml:link rel="alternate" hrefang="de" hre="http://example.com/deutsch/" />
<xhtml:link rel="alternate" hrefang="en" hre="http://example.com/english/" />
</url>
<url>
<loc>http://example.com/deutsch/</loc>
<xhtml:link rel="alternate" hrefang="en" hre="http://example.com/english/" />
<xhtml:link rel="alternate" hrefang="de" hre="http://www.example.com/deutsch/"
/>
</url>
</urlset>
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 5
Performance
Explore Chrome DevTools’ Timeline & JavaScript Proler to analyze the impact
o your JavaScript.
| The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 6