Document Details

LikeDrums

Uploaded by LikeDrums

Åbo Akademi University

Tags

SEO web development search engine optimization digital marketing

Summary

This document provides a comprehensive guide on SEO best practices for web developers. It covers various aspects of SEO, including important HTML elements, URL structures, image optimization, and more. Ideal for professionals in digital marketing and web development.

Full Transcript

The Web Developer’s SEO Cheat Sheet Get technical insights...

The Web Developer’s SEO Cheat Sheet Get technical insights with Moz Pro: mz.cm/free Important HTML Elements These affect how you show up in search results Best Practices HTTP Status Codes Webmaster Tools Title Tag Best between 50–60 characters 200 OK/Success Google Search Console Important keywords near the beginning search.google.com/search-console/about Page Title 301 Permanent redirect Well-written descriptions influence click-through rates (CTR) Bing Webmaster Tools 302 Temporary redirect bing.com/toolbox/webmaster Meta Description Tag Best around 160 characters 404 Not found Each description should be unique Yandex Well-written descriptions influence click-through rates (CTR) 500 Server error 503 Unavailable (retry later) Image Providing image height and width improves page speed Canonicalization Best Practices Common Duplicate Homepage URLs Preferred URL = https://example.com/ Place the following in section to https://www.example.com Hyperlinks Best Practices indicate preferred URL: https://example.com Text Link Use “nofollow” for paid links and https://www.example.com/index.html distrusted content More information at mz.cm/canonical Anchor Text https://example.com/index.html Use “sponsored” for sponsored or compensated links https://example.com/index.html?sessid=123 NoFollowed Link Use “ugc” for links within user-generated Anchor Text For image links, the alt attribute serves as the anchor text Image Link “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. Subfolder/path 6. Page 7. Parameter 8. Named anchor Robots Exclusion Standard Best Practices Important User Agents 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 from search results Googlebot (can be used as default for most Baiduspider Don’t block CSS or JavaScript files 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) X-Robots-Tag: noindex Wildcard for all robots: * Bingbot Nofollow (do not follow links) More information at mz.cm/x-robots Yandexbot Noarchive (do not show cache)...or combine (noindex, nofollow) Meta Robots Location: In the HTML If the robots tag is not defined, the default is "INDEX, FOLLOW" Don’t block noindex URLs in robots.txt. More information at mz.cm/x-robots They need to be crawled to be respected. “Sitemap Syntax” next page | 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 tags of your website. sitemap: parent tag for each sitemap http://www.example.com/foo.html 2019-06-04 lastmod: the last modified date Large websites should use multiple sitemaps listed under a single sitemap index file. Images 2019-01-01T18:23:17+00:00 News https://example.com/sitemap2.xml.gz * Don't forget to submit your sitemap to Google 2019-01-01 via Google Search Console. 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 for screen size) Page title tags & meta descriptions should remain the same Default to Open Graph Platforms that support Open Graph protocol include Facebook, Dynamic serving (serves different content based on Use the meta name="viewport" tag in the head of your page Twitter, LinkedIn, and Pinterest. a user’s device) to tell the browser how to adjust the content. Separate URLs (different URLs that serve mobile-optimized For example: Twitter: Minimum 144x144 px Check to see if your site is mobile-friendly: 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 deferring offscreen images. Facebook: Minimum 600x600 px More information at mz.cm/mobile-seo Try to use images that are at least 1080 px in width More information at mz.cm/social-meta | 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. Common Vocabularies: schema.org Common Structured Data Types: Local business Product Popular Formats: JSON-LD, RDFa, Microdata FAQ page Article Person Recipes Breadcrumbs How to QApage { More information at mz.cm/rich-snippets "@context": "http://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", Security "position": 1, "item": { "@id": "http://example.com/dinner", "name": "Dinner" } When using target="_blank" to open a link in a new tab, make sure you're implementing }, rel="noopener" }] or } rel="noreferrer" to avoid exposing your website to a surface attack. SSL certificates are table stakes today. Your website must have one. Reviews Lighthouse (mz.cm/lighthouse) helps to identify these vulnerabilities (and more) in the audit. { "@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" } } Review stars won’t show up in search results. “Targeting Multiple Languages” next page | 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 ccTLDs (Country-Level Only): example.de en English US United States Subdirectories with gTLDS: example.com/de/ es Spanish GB Great Britain Subdomains with gTLDS: de.example.com/ zh Chinese CN China hi Hindi IN India rel="alternate" hreflang="x" ja Japanese JP Japan Annotate alternate language & region versions of content More language codes can be found at More region codes can be found at mz.cm/langcodes mz.cm/regcodes HTML version in Each version must identify all versions, including itself (Specifies Default) (Specifies Lan- guage; English) (Speci- fies Language + Region) Sitemap Version http://example.com/english/ http://example.com/deutsch/ “Performance” next page | The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 5 Performance Page Speed Image Optimization The most common culprit of poor page speed is images! Page Speed Tips: Image Optimization Tips: Compress and minify your code Compress your images & experiment with quality settings Reduce page redirects Remove unnecessary image metadata Remove render-blocking JavaScript Explore lazy loading Use treeshaking Leverage SRCSET for different screen sizes Leverage browser caching Ensure that your images have alt text Use a CDN Invest in automated tools that can help ensure your image assets will always Leverage preconnect, prefetch and preload be optimized (example: mz.cm/imageopt) Analyze your critical rendering path performance for additional opportunities in Chrome Dev Tools. Test your Page Speed with: Lighthouse: developers.google.com/web/tools/lighthouse PageSpeed Insights: developers.google.com/speed/pagespeed/insights Thanks for GTmetrix: gtmetrix.com WebPageTest: webpagetest.org reading! Modern JavaScript Sites JavaScript Tips: Keep JavaScript bundles small (especially for mobile devices). Small bundles improve speed, lower memory usage, and reduce CPU costs. Use server-side or pre-rendering to improve site speed, user experience, and crawler accessibility. Stuck with client-side rendering? Try pre-rendering to help Googlebot get a more immediate HTML snapshot of your page. Use Chrome Dev Tools “Performance” tab to test your runtime performance and network “throttling” to simulate different device capabilities. Explore Chrome DevTools’ Timeline & JavaScript Profiler to analyze the impact of your JavaScript. | The Web Developer’s SEO Cheat Sheet | v5.0 | moz.com | Copyright 2020 © Moz, Inc. 6

Use Quizgecko on...
Browser
Browser