n8n-docs-datasets / docs-dataset /web_design_seo.jsonl
DavidrPatton's picture
Add docs-dataset dataset
4484c0f verified
{"instruction": "How do I implement SEO-friendly breadcrumbs?", "output": "# SEO-Friendly Breadcrumbs Implementation\n\n## HTML Structure\n```html\n<nav aria-label=\"Breadcrumb\" class=\"breadcrumb\">\n <ol itemscope itemtype=\"https://schema.org/BreadcrumbList\">\n <li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <a itemprop=\"item\" href=\"/\"><span itemprop=\"name\">Home</span></a>\n <meta itemprop=\"position\" content=\"1\" />\n </li>\n <li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <a itemprop=\"item\" href=\"/products\"><span itemprop=\"name\">Products</span></a>\n <meta itemprop=\"position\" content=\"2\" />\n </li>\n <li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">\n <span itemprop=\"name\">Current Page</span>\n <meta itemprop=\"position\" content=\"3\" />\n </li>\n </ol>\n</nav>\n```\n\n## JSON-LD Schema (Preferred)\n```html\n<script type=\"application/ld+json\">\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n {\"@type\": \"ListItem\", \"position\": 1, \"name\": \"Home\", \"item\": \"https://example.com/\"},\n {\"@type\": \"ListItem\", \"position\": 2, \"name\": \"Products\", \"item\": \"https://example.com/products\"},\n {\"@type\": \"ListItem\", \"position\": 3, \"name\": \"Widget X\"}\n ]\n}\n</script>\n```\n\n## CSS Styling\n```css\n.breadcrumb ol { display: flex; list-style: none; padding: 0; }\n.breadcrumb li:not(:last-child)::after { content: \"\u203a\"; margin: 0 0.5rem; color: #666; }\n.breadcrumb a { color: #0066cc; text-decoration: none; }\n.breadcrumb li:last-child { color: #333; font-weight: 500; }\n```\n\n## Best Practices\n1. Include on all pages except homepage\n2. Use hierarchical structure matching site navigation\n3. Make all levels clickable except current page\n4. Keep breadcrumb text concise\n5. Always include structured data for rich snippets", "metadata": {"topic": "breadcrumbs", "type": "implementation"}}
{"instruction": "What semantic HTML elements should I use for SEO?", "output": "# Semantic HTML for SEO\n\n## Document Structure\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Page Title | Brand Name</title>\n <meta name=\"description\" content=\"155 character description...\">\n <link rel=\"canonical\" href=\"https://example.com/page\">\n</head>\n<body>\n <header>\n <nav aria-label=\"Main navigation\">...</nav>\n </header>\n \n <main>\n <article>\n <header>\n <h1>Single H1 Per Page</h1>\n <time datetime=\"2024-01-15\">January 15, 2024</time>\n </header>\n <section>\n <h2>Section Heading</h2>\n <p>Content...</p>\n </section>\n </article>\n <aside>Sidebar content</aside>\n </main>\n \n <footer>\n <nav aria-label=\"Footer navigation\">...</nav>\n </footer>\n</body>\n</html>\n```\n\n## Key Semantic Elements\n| Element | Purpose | SEO Impact |\n|---------|---------|------------|\n| `<header>` | Page/section header | Defines main branding area |\n| `<nav>` | Navigation links | Helps crawlers understand structure |\n| `<main>` | Main content | Signals primary content area |\n| `<article>` | Self-contained content | Indicates complete, shareable content |\n| `<section>` | Thematic grouping | Organizes related content |\n| `<aside>` | Related content | Secondary information |\n| `<footer>` | Page/section footer | Copyright, links, contact |\n| `<h1>-<h6>` | Headings hierarchy | Critical for content structure |\n| `<time>` | Date/time | Machine-readable dates |\n| `<address>` | Contact info | Local SEO signal |\n\n## Heading Hierarchy Rules\n- Only ONE `<h1>` per page\n- Don't skip levels (h1 \u2192 h3)\n- Use headings for structure, not styling", "metadata": {"topic": "semantic_html", "type": "guide"}}
{"instruction": "What are all the essential meta tags for SEO?", "output": "# Essential Meta Tags for SEO\n\n## Required Meta Tags\n```html\n<head>\n <!-- Character encoding -->\n <meta charset=\"UTF-8\">\n \n <!-- Responsive design -->\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n \n <!-- Page title (50-60 chars) -->\n <title>Primary Keyword - Secondary Keyword | Brand</title>\n \n <!-- Meta description (150-160 chars) -->\n <meta name=\"description\" content=\"Compelling description with keywords that encourages clicks from search results.\">\n \n <!-- Canonical URL -->\n <link rel=\"canonical\" href=\"https://example.com/page\">\n \n <!-- Robots directive -->\n <meta name=\"robots\" content=\"index, follow\">\n</head>\n```\n\n## Open Graph (Social Sharing)\n```html\n<meta property=\"og:title\" content=\"Page Title\">\n<meta property=\"og:description\" content=\"Description for social shares\">\n<meta property=\"og:image\" content=\"https://example.com/image.jpg\">\n<meta property=\"og:url\" content=\"https://example.com/page\">\n<meta property=\"og:type\" content=\"website\">\n<meta property=\"og:site_name\" content=\"Brand Name\">\n```\n\n## Twitter Cards\n```html\n<meta name=\"twitter:card\" content=\"summary_large_image\">\n<meta name=\"twitter:title\" content=\"Page Title\">\n<meta name=\"twitter:description\" content=\"Description\">\n<meta name=\"twitter:image\" content=\"https://example.com/image.jpg\">\n<meta name=\"twitter:site\" content=\"@username\">\n```\n\n## Additional Important Tags\n```html\n<!-- Language alternatives -->\n<link rel=\"alternate\" hreflang=\"en\" href=\"https://example.com/en/page\">\n<link rel=\"alternate\" hreflang=\"es\" href=\"https://example.com/es/page\">\n\n<!-- Favicon -->\n<link rel=\"icon\" href=\"/favicon.ico\">\n<link rel=\"apple-touch-icon\" href=\"/apple-touch-icon.png\">\n\n<!-- Preconnect for performance -->\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n```", "metadata": {"topic": "meta_tags", "type": "reference"}}
{"instruction": "How do I implement structured data schema markup?", "output": "# Structured Data Implementation Guide\n\n## Common Schema Types\n\n### Organization\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"name\": \"Company Name\",\n \"url\": \"https://example.com\",\n \"logo\": \"https://example.com/logo.png\",\n \"sameAs\": [\n \"https://facebook.com/company\",\n \"https://twitter.com/company\",\n \"https://linkedin.com/company/company\"\n ],\n \"contactPoint\": {\n \"@type\": \"ContactPoint\",\n \"telephone\": \"+1-800-555-1234\",\n \"contactType\": \"customer service\"\n }\n}\n```\n\n### Article/Blog Post\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Article\",\n \"headline\": \"Article Title\",\n \"image\": \"https://example.com/image.jpg\",\n \"author\": {\"@type\": \"Person\", \"name\": \"Author Name\"},\n \"publisher\": {\n \"@type\": \"Organization\",\n \"name\": \"Publisher\",\n \"logo\": {\"@type\": \"ImageObject\", \"url\": \"https://example.com/logo.png\"}\n },\n \"datePublished\": \"2024-01-15\",\n \"dateModified\": \"2024-01-20\"\n}\n```\n\n### Product\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"Product Name\",\n \"image\": \"https://example.com/product.jpg\",\n \"description\": \"Product description\",\n \"brand\": {\"@type\": \"Brand\", \"name\": \"Brand\"},\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": \"99.99\",\n \"priceCurrency\": \"USD\",\n \"availability\": \"https://schema.org/InStock\"\n },\n \"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"4.5\",\n \"reviewCount\": \"89\"\n }\n}\n```\n\n### FAQ Page\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n \"mainEntity\": [\n {\n \"@type\": \"Question\",\n \"name\": \"What is your return policy?\",\n \"acceptedAnswer\": {\n \"@type\": \"Answer\",\n \"text\": \"We offer 30-day returns...\"\n }\n }\n ]\n}\n```\n\n### Local Business\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"LocalBusiness\",\n \"name\": \"Business Name\",\n \"address\": {\n \"@type\": \"PostalAddress\",\n \"streetAddress\": \"123 Main St\",\n \"addressLocality\": \"City\",\n \"addressRegion\": \"State\",\n \"postalCode\": \"12345\"\n },\n \"geo\": {\"@type\": \"GeoCoordinates\", \"latitude\": \"40.7128\", \"longitude\": \"-74.0060\"},\n \"openingHours\": \"Mo-Fr 09:00-17:00\"\n}\n```\n\n## Implementation\nPlace JSON-LD in `<head>` or before closing `</body>`:\n```html\n<script type=\"application/ld+json\">\n{ ... schema here ... }\n</script>\n```", "metadata": {"topic": "structured_data", "type": "implementation"}}
{"instruction": "How do I optimize Core Web Vitals for SEO?", "output": "# Core Web Vitals Optimization\n\n## The Three Metrics\n\n### LCP (Largest Contentful Paint) - Target: <2.5s\nMeasures loading performance.\n\n**Optimization:**\n```html\n<!-- Preload hero image -->\n<link rel=\"preload\" as=\"image\" href=\"/hero.webp\">\n\n<!-- Use modern formats -->\n<picture>\n <source srcset=\"image.avif\" type=\"image/avif\">\n <source srcset=\"image.webp\" type=\"image/webp\">\n <img src=\"image.jpg\" alt=\"Description\" loading=\"eager\">\n</picture>\n```\n\n```css\n/* Optimize fonts */\n@font-face {\n font-family: 'CustomFont';\n src: url('font.woff2') format('woff2');\n font-display: swap;\n}\n```\n\n### FID/INP (Interaction to Next Paint) - Target: <200ms\nMeasures interactivity.\n\n**Optimization:**\n```javascript\n// Break up long tasks\nfunction processData(items) {\n const chunk = items.splice(0, 100);\n // Process chunk\n if (items.length > 0) {\n requestIdleCallback(() => processData(items));\n }\n}\n\n// Defer non-critical JS\n<script src=\"analytics.js\" defer></script>\n```\n\n### CLS (Cumulative Layout Shift) - Target: <0.1\nMeasures visual stability.\n\n**Optimization:**\n```html\n<!-- Always set dimensions -->\n<img src=\"image.jpg\" width=\"800\" height=\"600\" alt=\"...\">\n\n<!-- Reserve space for ads -->\n<div style=\"min-height: 250px;\">\n <!-- Ad loads here -->\n</div>\n```\n\n```css\n/* Prevent font swap shift */\n.text { font-synthesis: none; }\n\n/* Aspect ratio for responsive images */\n.image-container {\n aspect-ratio: 16 / 9;\n}\n```\n\n## Quick Wins Checklist\n- [ ] Compress and serve images in WebP/AVIF\n- [ ] Enable Gzip/Brotli compression\n- [ ] Use CDN for static assets\n- [ ] Lazy load below-fold images\n- [ ] Minimize render-blocking resources\n- [ ] Set explicit image dimensions\n- [ ] Use font-display: swap", "metadata": {"topic": "core_web_vitals", "type": "optimization"}}
{"instruction": "What's the best URL structure for SEO?", "output": "# SEO-Friendly URL Structure\n\n## URL Best Practices\n\n### Good URL Examples\n```\nhttps://example.com/products/blue-widget\nhttps://example.com/blog/how-to-optimize-seo\nhttps://example.com/services/web-design\n```\n\n### Bad URL Examples\n```\nhttps://example.com/p?id=12345\nhttps://example.com/blog/post/2024/01/15/this-is-a-very-long-url-that-goes-on-forever\nhttps://example.com/Category/Sub_Category/Product%20Name\n```\n\n## URL Rules\n| Rule | Good | Bad |\n|------|------|-----|\n| Lowercase | /products/widget | /Products/Widget |\n| Hyphens | /blue-widget | /blue_widget or /bluewidget |\n| Short | /seo-guide | /the-complete-guide-to-seo-optimization-2024 |\n| Descriptive | /running-shoes | /product/12345 |\n| No special chars | /cafe-menu | /caf\u00e9-menu |\n| No trailing slash | /page | /page/ |\n\n## Folder Structure\n```\n/ # Homepage\n/about # About page\n/products # Products landing\n/products/category # Category page\n/products/category/item # Product page\n/blog # Blog index\n/blog/post-title # Blog post\n```\n\n## Technical Implementation\n```html\n<!-- Canonical URL -->\n<link rel=\"canonical\" href=\"https://example.com/products/widget\">\n\n<!-- Redirect www to non-www (or vice versa) -->\n<!-- In .htaccess or server config -->\n```\n\n```javascript\n// URL slug generation\nfunction generateSlug(title) {\n return title\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-|-$/g, '')\n .substring(0, 60);\n}\n```", "metadata": {"topic": "url_structure", "type": "guide"}}
{"instruction": "How do I create an effective internal linking structure?", "output": "# Internal Linking Strategy for SEO\n\n## Link Architecture\n```\nHomepage\n\u251c\u2500\u2500 Category Pages (linked from nav)\n\u2502 \u251c\u2500\u2500 Subcategory Pages\n\u2502 \u2502 \u2514\u2500\u2500 Product/Content Pages (interlinked)\n\u2502 \u2514\u2500\u2500 Related Categories (cross-linked)\n\u2514\u2500\u2500 Footer Links (legal, contact, sitemap)\n```\n\n## Best Practices\n\n### 1. Descriptive Anchor Text\n```html\n<!-- Good -->\n<a href=\"/seo-guide\">complete SEO guide</a>\n\n<!-- Bad -->\n<a href=\"/seo-guide\">click here</a>\n<a href=\"/seo-guide\">read more</a>\n```\n\n### 2. Contextual Relevance\nLink to related content within body paragraphs, not just navigation.\n\n### 3. Follow Link Hierarchy\n- Homepage \u2192 Category \u2192 Subcategory \u2192 Detail pages\n- 3 clicks max to any page\n\n### 4. Link to Important Pages\nPrioritize linking to:\n- High-converting pages\n- Pillar content\n- New content (for indexing)\n\n## Implementation Pattern\n```html\n<article>\n <p>\n When implementing <a href=\"/structured-data-guide\">structured data</a>, \n you should also consider your <a href=\"/site-speed-optimization\">site speed</a>.\n Learn more about <a href=\"/core-web-vitals\">Core Web Vitals</a> requirements.\n </p>\n \n <aside class=\"related-posts\">\n <h3>Related Articles</h3>\n <ul>\n <li><a href=\"/post-1\">Related Post 1</a></li>\n <li><a href=\"/post-2\">Related Post 2</a></li>\n </ul>\n </aside>\n</article>\n```\n\n## Link Audit Checklist\n- [ ] No orphan pages (pages with no internal links)\n- [ ] No broken links (404s)\n- [ ] Important pages have most internal links\n- [ ] Anchor text is varied and descriptive\n- [ ] Navigation is crawlable (no JS-only links)", "metadata": {"topic": "internal_linking", "type": "strategy"}}
{"instruction": "How do I optimize images for SEO?", "output": "# Image SEO Optimization\n\n## File Optimization\n```bash\n# Convert to WebP\ncwebp -q 80 image.jpg -o image.webp\n\n# Resize for web\nconvert image.jpg -resize 1200x800 -quality 85 image-optimized.jpg\n```\n\n## HTML Implementation\n```html\n<!-- Responsive images with srcset -->\n<img \n src=\"image-800.jpg\"\n srcset=\"image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w\"\n sizes=\"(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px\"\n alt=\"Descriptive alt text with keywords\"\n width=\"800\"\n height=\"600\"\n loading=\"lazy\"\n>\n\n<!-- Picture element for format fallback -->\n<picture>\n <source srcset=\"image.avif\" type=\"image/avif\">\n <source srcset=\"image.webp\" type=\"image/webp\">\n <img src=\"image.jpg\" alt=\"Description\" width=\"800\" height=\"600\">\n</picture>\n```\n\n## Alt Text Best Practices\n```html\n<!-- Good alt text -->\n<img alt=\"Red Nike running shoes on white background\" ...>\n\n<!-- Bad alt text -->\n<img alt=\"shoe\" ...>\n<img alt=\"IMG_2847.jpg\" ...>\n<img alt=\"\" ...> <!-- Only for decorative images -->\n```\n\n## File Naming\n```\n<!-- Good -->\nred-nike-running-shoes.jpg\n2024-annual-report-infographic.png\n\n<!-- Bad -->\nIMG_2847.jpg\nimage1.png\n```\n\n## Image Sitemap\n```xml\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">\n <url>\n <loc>https://example.com/page</loc>\n <image:image>\n <image:loc>https://example.com/image.jpg</image:loc>\n <image:title>Image Title</image:title>\n <image:caption>Image caption</image:caption>\n </image:image>\n </url>\n</urlset>\n```\n\n## Optimization Checklist\n- [ ] Compress all images (80-85% quality)\n- [ ] Use WebP/AVIF with fallbacks\n- [ ] Include width/height attributes\n- [ ] Add descriptive alt text\n- [ ] Use lazy loading for below-fold\n- [ ] Descriptive file names\n- [ ] Serve from CDN", "metadata": {"topic": "image_seo", "type": "optimization"}}
{"instruction": "How do I optimize a website for mobile SEO?", "output": "# Mobile SEO Optimization\n\n## Responsive Design\n```html\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n```\n\n```css\n/* Mobile-first approach */\n.container { width: 100%; padding: 1rem; }\n\n@media (min-width: 768px) {\n .container { max-width: 720px; margin: 0 auto; }\n}\n\n@media (min-width: 1024px) {\n .container { max-width: 960px; }\n}\n```\n\n## Touch-Friendly Design\n```css\n/* Minimum tap target size: 48x48px */\n.button, .link {\n min-height: 48px;\n min-width: 48px;\n padding: 12px 24px;\n}\n\n/* Adequate spacing between targets */\n.nav-links a {\n margin: 8px 0;\n}\n```\n\n## Mobile Performance\n```html\n<!-- Preload critical resources -->\n<link rel=\"preload\" href=\"critical.css\" as=\"style\">\n<link rel=\"preload\" href=\"hero-mobile.webp\" as=\"image\" media=\"(max-width: 768px)\">\n\n<!-- Defer non-critical JS -->\n<script src=\"app.js\" defer></script>\n```\n\n## Avoid Mobile Issues\n```css\n/* Prevent horizontal scroll */\nbody { overflow-x: hidden; }\nimg { max-width: 100%; height: auto; }\n\n/* Readable font sizes */\nbody { font-size: 16px; line-height: 1.6; }\n\n/* No fixed-width elements */\n.bad { width: 500px; } /* \u2717 */\n.good { max-width: 100%; } /* \u2713 */\n```\n\n## Mobile Testing\n1. Google Mobile-Friendly Test\n2. Chrome DevTools Device Mode\n3. Real device testing\n4. PageSpeed Insights (mobile tab)\n\n## Common Issues to Fix\n- [ ] Viewport meta tag present\n- [ ] No horizontal scrolling\n- [ ] Tap targets properly sized\n- [ ] Font sizes readable (16px+)\n- [ ] No intrusive interstitials\n- [ ] Fast load time (<3s on 4G)", "metadata": {"topic": "mobile_seo", "type": "optimization"}}
{"instruction": "How do I create and optimize an XML sitemap?", "output": "# XML Sitemap Implementation\n\n## Basic Sitemap Structure\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url>\n <loc>https://example.com/</loc>\n <lastmod>2024-01-15</lastmod>\n <changefreq>weekly</changefreq>\n <priority>1.0</priority>\n </url>\n <url>\n <loc>https://example.com/products</loc>\n <lastmod>2024-01-14</lastmod>\n <changefreq>daily</changefreq>\n <priority>0.8</priority>\n </url>\n</urlset>\n```\n\n## Sitemap Index (for large sites)\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <sitemap>\n <loc>https://example.com/sitemap-pages.xml</loc>\n <lastmod>2024-01-15</lastmod>\n </sitemap>\n <sitemap>\n <loc>https://example.com/sitemap-posts.xml</loc>\n <lastmod>2024-01-15</lastmod>\n </sitemap>\n <sitemap>\n <loc>https://example.com/sitemap-products.xml</loc>\n <lastmod>2024-01-15</lastmod>\n </sitemap>\n</sitemapindex>\n```\n\n## Priority Guidelines\n| Page Type | Priority |\n|-----------|----------|\n| Homepage | 1.0 |\n| Category pages | 0.8 |\n| Product/service pages | 0.7 |\n| Blog posts | 0.6 |\n| About/contact | 0.5 |\n| Legal pages | 0.3 |\n\n## robots.txt Reference\n```\nUser-agent: *\nAllow: /\n\nSitemap: https://example.com/sitemap.xml\n```\n\n## Submission\n1. Google Search Console \u2192 Sitemaps \u2192 Add\n2. Bing Webmaster Tools \u2192 Sitemaps \u2192 Submit\n\n## Best Practices\n- Max 50,000 URLs per sitemap\n- Max 50MB uncompressed\n- Use gzip compression for large sitemaps\n- Update lastmod only when content changes\n- Include only canonical, indexable URLs\n- Exclude noindex, redirected, or error pages", "metadata": {"topic": "sitemap", "type": "implementation"}}
{"instruction": "How do I configure robots.txt for SEO?", "output": "# robots.txt Configuration Guide\n\n## Basic Structure\n```\n# robots.txt for example.com\n\nUser-agent: *\nAllow: /\nDisallow: /admin/\nDisallow: /private/\nDisallow: /api/\nDisallow: /search?\nDisallow: /*?utm_*\n\nSitemap: https://example.com/sitemap.xml\n```\n\n## Common Directives\n```\n# Block all crawlers from a directory\nDisallow: /secret/\n\n# Block only Googlebot\nUser-agent: Googlebot\nDisallow: /no-google/\n\n# Block all crawlers except Googlebot\nUser-agent: *\nDisallow: /\nUser-agent: Googlebot\nAllow: /\n\n# Crawl delay (not supported by Google)\nUser-agent: Bingbot\nCrawl-delay: 10\n```\n\n## What to Block\n```\nDisallow: /admin/ # Admin areas\nDisallow: /cart/ # Shopping cart\nDisallow: /checkout/ # Checkout process\nDisallow: /account/ # User accounts\nDisallow: /api/ # API endpoints\nDisallow: /search # Search results\nDisallow: /*?sort= # Sorted/filtered pages\nDisallow: /*?page= # Pagination params\nDisallow: /thank-you # Thank you pages\nDisallow: /*.pdf$ # PDFs (optional)\n```\n\n## What NOT to Block\n```\n# Never block these\nAllow: /css/\nAllow: /js/\nAllow: /images/\nAllow: /*.css\nAllow: /*.js\n```\n\n## Testing\n1. Use Google Search Console robots.txt Tester\n2. Verify: `https://example.com/robots.txt`\n\n## Common Mistakes\n- Blocking CSS/JS (breaks rendering)\n- Using robots.txt for security (not secure!)\n- Blocking crawlers from sitemaps\n- Typos in directory names", "metadata": {"topic": "robots_txt", "type": "configuration"}}
{"instruction": "How does accessibility improve SEO?", "output": "# Accessibility for SEO\n\n## Overlap Between A11y and SEO\n\n### Alt Text\n```html\n<!-- Helps screen readers AND image search -->\n<img src=\"chart.png\" alt=\"Bar chart showing 50% growth in Q4 2024\">\n```\n\n### Heading Structure\n```html\n<!-- Logical hierarchy helps both -->\n<h1>Main Topic</h1>\n <h2>Subtopic 1</h2>\n <h3>Detail 1.1</h3>\n <h2>Subtopic 2</h2>\n```\n\n### Descriptive Links\n```html\n<!-- Good for screen readers AND anchor text SEO -->\n<a href=\"/pricing\">View our pricing plans</a>\n\n<!-- Bad -->\n<a href=\"/pricing\">Click here</a>\n```\n\n### Semantic HTML\n```html\n<nav aria-label=\"Main\">...</nav>\n<main>...</main>\n<aside>...</aside>\n<footer>...</footer>\n```\n\n## ARIA Landmarks\n```html\n<header role=\"banner\">\n<nav role=\"navigation\" aria-label=\"Primary\">\n<main role=\"main\">\n<aside role=\"complementary\">\n<footer role=\"contentinfo\">\n```\n\n## Form Accessibility\n```html\n<form>\n <label for=\"email\">Email Address</label>\n <input type=\"email\" id=\"email\" name=\"email\" required \n aria-describedby=\"email-hint\">\n <span id=\"email-hint\">We'll never share your email</span>\n</form>\n```\n\n## Skip Links\n```html\n<a href=\"#main-content\" class=\"skip-link\">Skip to main content</a>\n```\n\n```css\n.skip-link {\n position: absolute;\n left: -9999px;\n}\n.skip-link:focus {\n left: 0;\n top: 0;\n padding: 8px;\n background: #000;\n color: #fff;\n}\n```\n\n## Key Benefits\n1. Better user experience \u2192 Lower bounce rate\n2. Semantic markup \u2192 Better crawlability\n3. Alt text \u2192 Image SEO\n4. Descriptive links \u2192 Better anchor text\n5. Keyboard accessible \u2192 Works without JS", "metadata": {"topic": "accessibility_seo", "type": "guide"}}
{"instruction": "How do I improve page speed for better SEO rankings?", "output": "# Page Speed Optimization for SEO\n\n## Critical Rendering Path\n```html\n<head>\n <!-- Critical CSS inline -->\n <style>\n /* Above-the-fold styles only */\n body { margin: 0; font-family: system-ui; }\n header { background: #333; color: white; }\n </style>\n \n <!-- Defer non-critical CSS -->\n <link rel=\"preload\" href=\"styles.css\" as=\"style\" onload=\"this.onload=null;this.rel='stylesheet'\">\n \n <!-- Preload critical resources -->\n <link rel=\"preload\" href=\"hero.webp\" as=\"image\">\n <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n</head>\n```\n\n## JavaScript Optimization\n```html\n<!-- Defer non-critical JS -->\n<script src=\"analytics.js\" defer></script>\n\n<!-- Async for independent scripts -->\n<script src=\"chat-widget.js\" async></script>\n\n<!-- Critical JS inline -->\n<script>\n // Minimal inline JS for above-fold interactivity\n</script>\n```\n\n## Image Optimization\n```html\n<img \n src=\"placeholder.jpg\" \n data-src=\"actual-image.webp\"\n loading=\"lazy\"\n width=\"800\" height=\"600\"\n alt=\"Description\"\n>\n```\n\n## Caching Headers\n```\n# .htaccess\n<IfModule mod_expires.c>\n ExpiresActive On\n ExpiresByType image/webp \"access plus 1 year\"\n ExpiresByType text/css \"access plus 1 month\"\n ExpiresByType application/javascript \"access plus 1 month\"\n</IfModule>\n```\n\n## Compression\n```\n# Enable Brotli (preferred) or Gzip\n<IfModule mod_brotli.c>\n AddOutputFilterByType BROTLI_COMPRESS text/html text/css application/javascript\n</IfModule>\n```\n\n## Quick Wins\n| Action | Impact |\n|--------|--------|\n| Enable compression | -70% file size |\n| Optimize images | -50% image size |\n| Use CDN | -30% latency |\n| Browser caching | Faster repeat visits |\n| Minify CSS/JS | -20% file size |\n| Lazy load images | Faster initial load |\n\n## Testing Tools\n1. PageSpeed Insights\n2. GTmetrix\n3. WebPageTest\n4. Chrome DevTools Performance", "metadata": {"topic": "page_speed", "type": "optimization"}}
{"instruction": "How does HTTPS and security affect SEO?", "output": "# HTTPS & Security for SEO\n\n## HTTPS Implementation\n```\n# Redirect HTTP to HTTPS\n<IfModule mod_rewrite.c>\n RewriteEngine On\n RewriteCond %{HTTPS} off\n RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n</IfModule>\n```\n\n## Security Headers\n```html\n<!-- In server config or meta tags -->\n<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'self'\">\n<meta http-equiv=\"X-Content-Type-Options\" content=\"nosniff\">\n<meta http-equiv=\"X-Frame-Options\" content=\"SAMEORIGIN\">\n```\n\n```\n# .htaccess security headers\nHeader always set Strict-Transport-Security \"max-age=31536000; includeSubDomains\"\nHeader always set X-Content-Type-Options \"nosniff\"\nHeader always set X-Frame-Options \"SAMEORIGIN\"\nHeader always set X-XSS-Protection \"1; mode=block\"\nHeader always set Referrer-Policy \"strict-origin-when-cross-origin\"\n```\n\n## SSL Certificate Checklist\n- [ ] Valid SSL certificate (not expired)\n- [ ] Certificate matches domain\n- [ ] Full chain certificate installed\n- [ ] No mixed content (HTTP on HTTPS pages)\n- [ ] HSTS header enabled\n- [ ] HTTP \u2192 HTTPS redirects in place\n\n## SEO Impact\n| Factor | Impact |\n|--------|--------|\n| HTTPS | Ranking signal (minor) |\n| Page security | Trust signal |\n| Mixed content | Can cause issues |\n| Expired cert | Browser warnings = lost traffic |\n\n## Common Issues\n1. Mixed content warnings\n2. Redirect chains (HTTP \u2192 HTTPS \u2192 www)\n3. Canonical URLs not updated to HTTPS\n4. Internal links still pointing to HTTP\n5. Sitemap URLs not updated", "metadata": {"topic": "security_seo", "type": "guide"}}
{"instruction": "How do I implement hreflang for international SEO?", "output": "# International SEO with hreflang\n\n## hreflang Implementation\n```html\n<head>\n <!-- Current page in multiple languages -->\n <link rel=\"alternate\" hreflang=\"en\" href=\"https://example.com/page\">\n <link rel=\"alternate\" hreflang=\"es\" href=\"https://example.com/es/page\">\n <link rel=\"alternate\" hreflang=\"fr\" href=\"https://example.com/fr/page\">\n <link rel=\"alternate\" hreflang=\"de\" href=\"https://example.de/page\">\n \n <!-- Default fallback -->\n <link rel=\"alternate\" hreflang=\"x-default\" href=\"https://example.com/page\">\n</head>\n```\n\n## URL Structures\n```\n# Subdirectories (Recommended)\nexample.com/en/\nexample.com/es/\nexample.com/fr/\n\n# Subdomains\nen.example.com\nes.example.com\n\n# ccTLDs (Country-specific)\nexample.com (US)\nexample.co.uk (UK)\nexample.de (Germany)\n```\n\n## Language + Region Codes\n```html\n<!-- Language only -->\nhreflang=\"en\"\nhreflang=\"es\"\n\n<!-- Language + Region -->\nhreflang=\"en-US\"\nhreflang=\"en-GB\"\nhreflang=\"es-MX\"\nhreflang=\"es-ES\"\n```\n\n## XML Sitemap Method\n```xml\n<url>\n <loc>https://example.com/page</loc>\n <xhtml:link rel=\"alternate\" hreflang=\"en\" href=\"https://example.com/page\"/>\n <xhtml:link rel=\"alternate\" hreflang=\"es\" href=\"https://example.com/es/page\"/>\n <xhtml:link rel=\"alternate\" hreflang=\"x-default\" href=\"https://example.com/page\"/>\n</url>\n```\n\n## Common Mistakes\n- Missing return links (A\u2192B but not B\u2192A)\n- Incorrect language codes\n- Forgetting x-default\n- Different content on same hreflang\n- Using hreflang for same-language regions only\n\n## Validation\nUse Google Search Console's International Targeting report", "metadata": {"topic": "international_seo", "type": "implementation"}}
{"instruction": "How do I optimize a website for local SEO?", "output": "# Local SEO Optimization\n\n## Google Business Profile\n- Claim and verify listing\n- Complete all information\n- Add photos regularly\n- Respond to reviews\n- Post updates weekly\n\n## Local Schema Markup\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"LocalBusiness\",\n \"name\": \"Business Name\",\n \"image\": \"https://example.com/photo.jpg\",\n \"address\": {\n \"@type\": \"PostalAddress\",\n \"streetAddress\": \"123 Main St\",\n \"addressLocality\": \"New York\",\n \"addressRegion\": \"NY\",\n \"postalCode\": \"10001\",\n \"addressCountry\": \"US\"\n },\n \"geo\": {\n \"@type\": \"GeoCoordinates\",\n \"latitude\": \"40.7128\",\n \"longitude\": \"-74.0060\"\n },\n \"url\": \"https://example.com\",\n \"telephone\": \"+1-212-555-1234\",\n \"openingHoursSpecification\": [\n {\n \"@type\": \"OpeningHoursSpecification\",\n \"dayOfWeek\": [\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\"],\n \"opens\": \"09:00\",\n \"closes\": \"17:00\"\n }\n ]\n}\n```\n\n## NAP Consistency\nEnsure Name, Address, Phone is IDENTICAL everywhere:\n- Website\n- Google Business Profile\n- Yelp\n- Facebook\n- Industry directories\n- Local citations\n\n## Local Content\n- City/neighborhood pages\n- Local event coverage\n- Community involvement\n- Local case studies\n- Area-specific services\n\n## Local Keywords\n```html\n<title>Plumber in Brooklyn, NY | Company Name</title>\n<meta name=\"description\" content=\"Brooklyn's trusted plumber serving Park Slope, Williamsburg, and DUMBO. 24/7 emergency service. Call 555-1234.\">\n\n<h1>Professional Plumbing Services in Brooklyn</h1>\n```\n\n## Review Strategy\n1. Ask satisfied customers\n2. Make it easy (direct links)\n3. Respond to all reviews\n4. Address negative reviews professionally", "metadata": {"topic": "local_seo", "type": "guide"}}
{"instruction": "What are the key SEO elements for e-commerce websites?", "output": "# E-Commerce SEO Essentials\n\n## Product Page Optimization\n```html\n<head>\n <title>Blue Running Shoes - Nike Air Max | Store Name</title>\n <meta name=\"description\" content=\"Nike Air Max running shoes in blue. Free shipping over $50. 30-day returns. In stock and ready to ship.\">\n <link rel=\"canonical\" href=\"https://store.com/products/nike-air-max-blue\">\n</head>\n```\n\n## Product Schema\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Product\",\n \"name\": \"Nike Air Max\",\n \"image\": [\"front.jpg\", \"side.jpg\", \"back.jpg\"],\n \"description\": \"Premium running shoes...\",\n \"sku\": \"NIKE-AM-001\",\n \"brand\": {\"@type\": \"Brand\", \"name\": \"Nike\"},\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": \"https://store.com/products/nike-air-max\",\n \"priceCurrency\": \"USD\",\n \"price\": \"129.99\",\n \"availability\": \"https://schema.org/InStock\",\n \"seller\": {\"@type\": \"Organization\", \"name\": \"Store Name\"}\n },\n \"aggregateRating\": {\n \"@type\": \"AggregateRating\",\n \"ratingValue\": \"4.5\",\n \"reviewCount\": \"89\"\n }\n}\n```\n\n## Category Pages\n- Unique descriptions (not just product lists)\n- Faceted navigation with proper canonicals\n- Pagination with rel=\"next/prev\"\n- Include relevant keywords naturally\n\n## Common E-Commerce Issues\n1. **Duplicate content**: Product variants, sorting, filtering\n2. **Thin content**: Auto-generated descriptions\n3. **Crawl budget**: Faceted navigation creating millions of URLs\n4. **Out of stock**: Handle with 404, redirect, or hide\n\n## Faceted Navigation\n```html\n<!-- Block filter combinations in robots.txt + noindex -->\n<meta name=\"robots\" content=\"noindex, follow\">\n\n<!-- Or use canonical to main category -->\n<link rel=\"canonical\" href=\"https://store.com/shoes\">\n```\n\n## Key Pages Checklist\n- [ ] Unique product descriptions\n- [ ] High-quality images with alt text\n- [ ] Customer reviews\n- [ ] Clear pricing and availability\n- [ ] Related products section\n- [ ] Breadcrumb navigation\n- [ ] Mobile-optimized checkout", "metadata": {"topic": "ecommerce_seo", "type": "guide"}}