Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

SEO Cheat Sheet

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4
At a glance
Powered by AI
The document discusses SEO best practices including important HTML elements, URL structures, linking strategies, and internationalization techniques.

Important HTML elements discussed include <title>, <meta> tags, image alt text.

Recommendations for URLs include using shorter, descriptive paths without unnecessary parameters. Proper linking includes using HTML over JavaScript and nofollow for untrusted links.

The Web Developers

SEO Cheat Sheet


Important HTML Elements

HTTP Status Codes

Title Tag

Best Practices

200 OK/Success

<head>
<title>Page Title</title>
</head>

Less than 512px (50-70 characters)


Important keywords near the beginning
Each title should be unique

301 Permanent Redirect

Meta Description Tag

Webmaster Tools

302 Temporary Redirect


404 Not Found
410 Gone (permanently removed)

<head>
<meta name="description"
content="This is an example.">
</head>

Best under 155 characters


Each description should be unique
Well written descriptions influence
click-through rate

Image

500 Server Error

Google Webmaster Tools


https://www.google.com/webmasters/tools/home

Bing Webmaster Tools


http://www.bing.com/toolbox/webmaster/

503 Unavailable (retry later)

Yandex Webmaster

More information at
http://mz.cm/HTTP-codes

https://webmaster.yandex.com/

<img src="img/keyword.jpg" alt="keyword" width="100" height="100">

Canonicalization

Hyperlinks
Text Link

Hyperlinking Best Practices

Common Duplicate Homepage URLs

Canonicalized URL Best Practices

<a href="https://www.example.com/
webpage.html">Keyword in Anchor
Text</a>

Preference: HTML links over


JavaScript

https://www.example.com

Preferred URL = https://example.com/

NoFollowed Link

Use "nofollow" for paid links and untrusted content

https://example.com

Place the following in <head> section to


indicate preferred URL:

<a href="https://www.example.com/
webpage.html" rel="nofollow">
Keyword in Anchor Text</a>

For image links, the alt attribute serves


as anchor text

https://www.example.com/index.html
https://example.com/index.html

<link href="https://example.com/"
rel="canonical" />

Image Link
<a href="https://www.example.com/webpage.html"><img src="img/
keyword.jpg" alt="keyword" width="100" height="100"></a>

URL Best Practices


Common URL Elements
https://store.example.com/category/keyword?id=123#top

1 2 3 4 5

7 8

1. Protocol
2. Subdomain
3. Root Domain
4. Top-Level Domain
5. Subfolder/Path
6. Page
7. Parameter
8. Named Anchor

https://example.com/index.html&sessid=123

More information at http://mz.cm/canonical

SEO Tips for URLs


Choose shorter, human-readable URLs with descriptive keywords
Exclude dynamic parameters when possible (see Canonicalization and Pagination)
When possible, place content on the same subdomain to preserve authority
Recommended: https://example.com/blog
Less Ideal: https://blog.example.com
V3.0

moz.com

2015 SEOmoz

Robot Control Syntax


Robots.txt
Location: https://example.com/robots.txt
User-agent: googlebot
Disallow: /example.html
Sitemap: https://example.com/sitemap.xml
More information at http://www.robotstxt.org/robotstxt.html

X-Robots
Location: Sent in the HTTP headers
X-Robots-Tag: noindex
More information at http://noarchive.net/xrobots/

Meta Robots
Location: In the html <head>
<meta name="ROBOT NAME" content="ARGUMENTS" />
More information at http://www.robotstxt.org/meta.html

Important User Agents


Robots Best Practices

For robots.txt, robots meta tags, and X-Robots-Tag

Only Meta Robots and X-Robots


remove URLs from search results

Googlebot (can be used


as default for most
Google crawlers)

Mediapartners-Google
(Mobile Adsense) or
Mediapartners

Googlebot-News

Googlebot-Mobile

Googlebot-Image

Googlebot-Video

AdsBot-Google

Bingbot

Baiduspider

Yandexbot

FacebookExternalHit

Applebot

Slurp

Twitterbot

* (wildcard for all robots)

Rogerbot

Don't block CSS or JavaScript files


with robots.txt

Arguments can be:


Nofollow (do not follow links)
Noindex (do not index)
Noarchive (do not archive)
NoODP (Do not show Open Directory
Project description)
...Or combined (noindex, nofollow)
If the robots <META> tag is not defined,
the default is "INDEX,FOLLOW"

Sitemap Syntax

Pagination

XML Sitemaps

Default Locations Can Be:

<?xml version="1.0" encoding="UTF-8"?>


<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2015-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
</urlset>

https://example.com/sitemap.xml

Sitemap Index File


<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>

<loc>https://example.com/sitemap1.xml.gz</loc>

<lastmod>015-01-01T18:23:17+00:00</lastmod>
</sitemap>

<sitemap>

<loc>https://example.com/sitemap2.xml.gz</loc>

<lastmod>2015-01-01</lastmod>
</sitemap>
</sitemapindex>

The Web Developers SEO Cheat Sheet

Use rel="next" and rel="prev" in the <head> section


to indicate the relationship between paginated URLs

https://example.com/sitemap.xml.gz

First Page - https://example.com/article

https://example.com/sitemap.gz

<link rel="next" href="https://example.com/article?pg=2">

Second Page - https://example.com/article?pg=2


Other Common Sitemap Types:
Mobile

<link rel="prev" href="https://example.com/article">


<link rel="next" href="https://example.com/article?pg=3">

News
Image
Video

Final Page - https://example.com/article?pg=3


<link rel="prev" href="https://example.com/article?pg=2">

More information at http://mz.cm/rel-next

V3.0

moz.com

2015 SEOmoz

Important Social Metadata

Rich Snippets and Structured Data

Sample Meta Tag Template: "Article"

Enhance search results and help machines to understand your content

Place this data between the <head> tags of your website

Common Vocabularies

<!-- Twitter Card data -->


<meta name="twitter:card" content="summary">

schema.org
datavocabulary.org
microformats.org

<meta name="twitter:site" content="[@publisher_handle]">

Breadcrumbs

<meta name="twitter:title" content="[Page Title]">

Widgets > Large Widgets

<meta name="twitter:description" content="[Page description


less than 200 characters]">
<meta name="twitter:creator" content="[@author_handle]">
<!-- Twitter Summary card images must be at least 120x120px -->
<meta name="twitter:image" content="[https://example.com/image.jpg]">
<!-- Open Graph data -->
<meta property="og:title" content="[Title Here]" />
<meta property="og:type" content="[article]" />
<meta property="og:url" content="[https://example.com/]" />

<meta property="og:site_name" content="[Site Name, i.e. Moz]" />


<meta property="fb:app_id" content="[FB_APP_ID]" />

Social Metadata Best Practices


Default to Open Graph

Optimal Image Sizing

Platforms that support Open


Graph protocol include:

Choose large images over small


Twitter:
Minimum 120 x 120px
No larger than 1MB
Facebook:
Minimum 200 x 200px
Over 1200 x 630px recommended

Facebook
Twitter
Google+
LinkedIn
Pinterest

More information at http://mz.cm/social-meta

The Web Developers SEO Cheat Sheet

Microdata
RDFa
JSON-LD

<div id="a" itemscope itemtype="http://data-vocabulary.org/Breadcrumb" itemref="b">


<a href="https://example.com/widgets" itemprop="url">
<span itemprop="title">Widgets</span>
</a>
</div>
<div id="b" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"
itemprop="child">
<a href="https://example.com/widgets/large" itemprop="url">
<span itemprop="title">Large Widgets</span>
</a>
</div>

Reviews
Rating: 5.0 - Review by Roger Mozbot

<meta property="og:image" content="[https://example.com/image.jpg]" />


<meta property="og:description" content="[Description Here]" />

Popular Formats

<div itemscope itemtype="http://schema.org/Review">


<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Book">
<span itemprop="name">The Art of SEO</span>
</div>
<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<span itemprop="ratingValue">5</span>
</span> stars <b>"<span itemprop="name">A good read.</span>" </b>
<span itemprop="author">Roger Mozbot</span>
<span itemprop="reviewBody">The Art of SEO is a good book.</span>
</div>

Common Structured Data Uses


Events

Recipes

Business Information

Media Content

People

Contact Data

Mobile Apps

Email Markup

More information at http://mz.cm/rich-snippets

V3.0

moz.com

2015 SEOmoz

Targeting Multiple Languages

Mobile Web Development

Declare language attribute in the HTML element

<html lang="fr">

Responsive Design

Place the meta viewport tag in the <head> of the document

URL Structures for Country & Language Targeting


ccTLDs (Country Level Only)

Subdomains with gTLDS

example.de

de.example.com/

<meta name="viewport" content="width=device-width,


initial-scale=1.0">

Uses CSS to alter the rendering of the page on the device using
media queries
<link rel="stylesheet" media="(min-width: 700px)"
href="min-700px.css">

Subdirectories with gTLDS


example.com/de/

rel="alternate" hreflang="x"
Annotate alternate language & region versions of content
HTML version in <head>
<link rel="alternate" hreflang="x-default" href="https://example.com/" /> (Specifies Default)
<link rel="alternate" hreflang="de" href="https://example.com/de/" /> (Specifies Language)
<link rel="alternate" hreflang="de-ES" href="https://example.com/de-es/" /> (Specifies Language + Region)

<style>
@media (min-width:500px) and (max-width:600px)
{h1{color:#555}}
</style>

Dynamic Serving via Vary HTTP Header

Serves different HTML and CSS on the same URL, varied by user agent
HTTP/1.1 200 OK

Sitemap version

Content-Type: text/html

<?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>

Vary: User-Agent
Content-Length: 3495

(...rest of HTTP response headers...)

<loc>https://example.com/english</loc>
<xhtml:link rel="alternate" hreflang="de" href="https://example.com/deutsch/" />
<xhtml:link

rel="alternate" hreflang="en"

href="https://example.com/english/" />

</url>

<url>
<loc>http://example.com/deutsch/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/english/" />
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/" />

Separate URLs

Identify mobile and desktop versions using


rel="alternate" and rel="canonical"

</url>
</urlset>

Desktop page: http://example.com/

Popular Languages

Popular Regions

zh Chinese
es Spanish
en English
ar Arabic
hi Hindi

CN China
US United States
IN India
JP Japan
BR Brazil

<link rel="alternate" media="only screen and (max-

More language codes can be found at


http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

width: 640px)"

More region codes can be found at


http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Mobile page: http://m.example.com/



<link rel="canonical" href="https://example.com/"/>

The Web Developers SEO Cheat Sheet

href="https://m.example.com/"/>

V3.0

moz.com

2015 SEOmoz

You might also like