24 SEO interview questions with detailed answers, sorted from basic to advanced. Free to practice, with progress saved automatically.
SEO covers the practices that help search engines crawl, understand, and rank a website's content, which makes it relevant to frontend work as well as marketing. Questions here range from the fundamentals and technical SEO to how CSR, SSR, and SSG affect crawling of single-page apps, structured data with Schema.org, and the Metadata API in the Next.js App Router.
SEO (Search Engine Optimization) is the practice of optimizing a website to rank higher on Google, Bing, and other search engines. Many users reach a website through a search engine, and frontend developers directly determine whether pages can be indexed and ranked. Frontend developers impact…
Frontend developers need five things in <head for SEO: title, description, robots, canonical and Open Graph. People call them all "meta tags" for convenience, but <title is its own element and canonical is a <link; only description and robots are <meta tags. Title (<title): the…
robots.txt is a text file placed at the root domain (example.com/robots.txt) that instructs search engine bots which parts of the website to crawl or avoid. Syntax: User-agent: (applies to all bots), Disallow: /admin (do not crawl /admin), Allow: /admin/public (re-allow this specific path), Sitemap: https://example.com/sitemap.xml.…
An XML sitemap (sitemap.xml) is a file listing all important URLs on a website, helping search engines discover and index content faster. Format: <urlset contains multiple <url entries, each with <loc (URL), <lastmod (last modified date), <changefreq and <priority — note that Google ignores <changefreq…
A canonical URL is the URL you mark as the "main version" when several URLs show the same content. You declare it with a <link rel="canonical" tag in <head; Google consolidates the signals of the duplicates (incoming links, ranking) into that URL and prefers to…
Rendering strategy decides whether content is already in the HTML the server returns or only appears after JS runs — CSR carries the highest risk, SSR/SSG are the safest choices. CSR (Client-Side Rendering): The initial HTML is essentially empty; JS renders the content — Google…
Core Web Vitals (CWV) are three metrics measuring real user experience, and have been a Google ranking signal since 2021. INP replaced FID in March 2024. LCP (Largest Contentful Paint): how long it takes to render the largest element in the first screen (hero image,…
Structured data describes a page's content using the standard Schema.org vocabulary (this is a product, here is its price; this is an article, who wrote it and when). Google reads it to know for sure what the page is about instead of guessing from the…
Open Graph is a set of <meta property="og:..." tags that decides how a link looks when shared: title, description, image. Facebook created the standard, and LinkedIn, Zalo, Telegram and Slack read it too. Twitter Cards are X's own twitter:... tags; when they are missing, X…
An internal link is a link from one page to another on the same website. It affects SEO in three ways, all stemming from the fact that Googlebot follows links to find pages. - Helps Google find pages: Googlebot discovers new pages mainly by following…
The Next.js App Router Metadata API lets you declare <title, <meta and other SEO tags by exporting them from layout.tsx or page.tsx. Next.js renders them on the server, so crawlers get the tags in the HTML without a library like react-helmet. There are two ways…
Next.js App Router has native sitemap and robots.txt support with TypeScript type-safety — no plugins or static files needed. Sitemap: create app/sitemap.ts with a default export function returning a MetadataRoute.Sitemap array. Each item includes url, lastModified, changeFrequency, and priority. Fetch from DB or CMS for…
Alt text is the value of the alt attribute on an <img tag: text that stands in for the image when the reader cannot see it. Alt text matters because three things rely on it: - Screen readers: visually impaired users hear the alt text…
A URL is only a minor ranking signal. Its bigger job is letting users and Google guess what a page is about before opening it: /blog/react-query-tutorial says far more than /blog/post?id=123. Guidelines from Google's docs: - Use readable words, not long IDs: people and Google…
Core distinction: 301/308 = permanent, 302/307 = temporary — and the 307/308 pair preserves the HTTP method + body, while 301/302 allow browsers to change POST to GET (legacy behavior). SEO impact: - A permanent redirect is a signal for Google to pick the target…
Mobile-first indexing means Google uses the mobile version of a page (crawled by the smartphone Googlebot) for indexing and ranking — not the desktop version. Content that exists only on desktop but is missing on mobile does not count for ranking. What developers need to…
A good plan follows the order fix the technical foundation first, then content, and measure continuously: the first quarter audits and fixes indexing issues, the middle quarters push keywords, content and links, and the last quarter optimizes from real data. The interviewer wants to see…