Dev.to · 4 min read

SEO for Developers: Stop obsessing over keywords and fix your Core Web Vitals

SEO for Developers: Stop obsessing over keywords and fix your Core Web Vitals

Most developers hate SEO because it feels like magic or marketing fluff. We get told to "add more keywords" or "get more backlinks," which are tasks for content writers and PR people. But there is a massive technical side to SEO that is entirely within our control. If your site is slow, has layout shifts, or uses a div for everything, no amount of keyword stuffing will save your rankings. Google cares about user experience. Here is how to handle the technical side of SEO without becoming a marketing expert. The Layout Shift Nightmare Cumulative Layout Shift (CLS) is one of the most frustrating metrics for users and a signal for search engines. You know when you are about to click a button, but an image finally loads, the page jumps, and you click an ad instead? That is a CLS failure. To fix this, stop letting the browser guess the size of your elements. Always define width and height attributes on images. If you are using responsive images with width: 100%, use the aspect-ratio CSS property. This reserves the space before the asset downloads, keeping the page stable. Semantic HTML is not optional I see too many modern apps that are just a sea of and tags. While the browser can render this, search engine crawlers struggle to understand the hierarchy of your information. Use the correct tags. A tag tells the crawler where the primary content lives. An tag defines a self contained piece of content. Use through in a logical order. Never use an just because you like the font size; use CSS for styling and HTML for meaning. When you use a tag, the crawler knows exactly where your site navigation is, which helps it index your internal links more efficiently. The Client-Side Rendering Trap If you are building a heavy Single Page App (SPA) with React, Vue, or Angular, you might be killing your SEO. While Google can execute JavaScript, it is not as reliable or fast as parsing static HTML. Some crawlers give up if the content takes too long to render. If your content is dynamic but needs to be indexed, move to Server-Side Rendering (SSR) or Static Site Generation (SSG). This ensures that when a bot hits your URL, it receives a fully formed HTML document. If you cannot move away from a pure CSR architecture, look into pre-rendering tools that generate static versions of your pages during the build process. Metadata and Social Graph Your and tags are the primary way your site appears in search results. If you leave these blank or use a generic "Home Page" title, your click-through rate will plummet. Beyond basic SEO, implement Open Graph (og:) and Twitter Card tags. These do not directly boost your rank, but they control how your links look when shared on social media. A link with a proper image and a concise summary gets more clicks, which leads to more traffic, which indirectly signals to search engines that your content is valuable. The robots.txt and Sitemap Duo Do not let search engines waste their "crawl budget" on pages that do not matter. Your /admin panel, your /search results pages, and your /thank-you pages should not be indexed. Use a robots.txt file to tell bots where they are not allowed to go. Pair this with a sitemap.xml file. A sitemap is essentially a map of your site that tells the crawler, "Here are the 50 pages I actually care about." This ensures that new content is found and indexed much faster than waiting for the crawler to find a link to it. Concrete Takeaway Stop thinking of SEO as a marketing task. Treat it as a performance and accessibility task. If you focus on fast load times, zero layout shift, and semantic HTML, you are doing 80 percent of the technical work. The rest is just writing good content.

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More Programming & Dev News