The authoritative source for crawling, indexing, and ranking. Read the Crawling & Indexing section first. Read →
SEO has two sides: content (what you say) and technical (how Google finds and reads you). Developers own the technical side — and it has major ranking impact.
A site with great content can rank poorly because of: broken sitemap, missing canonical tags, slow load time, JavaScript rendering that blocks indexing, or no structured data. All code problems you can fix.
# Serve at: /robots.txt
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
Disallow: /dashboard/
Sitemap: https://yourapp.com/sitemap.xml
robots.txt is not a security measure — it's publicly readable. Only use it to guide crawlers, never to hide private data.
<!-- /sitemap.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourapp.com/</loc>
<lastmod>2025-06-01</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://yourapp.com/blog/my-post/</loc>
<lastmod>2025-05-01</lastmod>
<priority>0.8</priority>
</url>
</urlset>
<link rel="canonical" href="https://yourapp.com/blog/my-post/" />
<!-- Prevents duplicate content from:
- HTTP vs HTTPS
- www vs non-www
- trailing slash vs none
- ?utm_source= parameters -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Deploy Node.js to AWS",
"author": { "@type": "Person", "name": "Alice" },
"datePublished": "2025-06-01",
"url": "https://yourapp.com/blog/deploy-nodejs-aws"
}
</script>
Enables rich results in search (breadcrumbs, FAQs, star ratings). Test with Google's Rich Results Test.
<title>Deploy Node.js to AWS — YourApp Blog</title>
<meta name="description" content="Step-by-step guide to deploying..." />
<meta property="og:title" content="Deploy Node.js to AWS" />
<meta property="og:image" content="https://yourapp.com/og.jpg" />
<meta property="og:url" content="https://yourapp.com/blog/deploy-nodejs-aws" />
<meta name="twitter:card" content="summary_large_image" />