A robots.txt file works identically in React applications as it does on traditional websites. It's a plain text file that sits at your domain root (yourdomain.com/robots.txt) and instructs search engine bots which URLs to crawl or skip. The difference with React is where you place it and how you deploy it, not what it does. In a standard Create React App setup, you drop robots.txt into the public folder. When you run npm run build, that file gets copied to your build directory root automatically. If you're using Next.js, same rule applies—put it in the public folder. The file must be publicly accessible at the root path, not nested in subdirectories. The common mistake we see is developers blocking everything during development then forgetting to update it for production. A robots.txt with "User-agent: * Disallow: /" will tank your entire site's indexability. We've inherited React sites where the staging robots.txt got pushed live and zero pages indexed for months. Always verify after deployment that your production robots.txt reflects your actual crawl intentions. For React SPAs, you also need to consider your routing setup. If you're using hash routing (URLs with #), those fragments don't get sent to the server, so robots.txt rules won't block them anyway—you'd need meta robots tags in your dynamically rendered head instead. Clean URL routing with proper server configuration works normally. At Ottawa SEO, we typically use robots.txt sparingly on React sites—blocking admin paths, filtering parameters, or disallowing resource-heavy search facets. The real indexation control happens through meta robots tags injected via React Helmet or next/head, since those can be page-specific and handle the dynamic nature of SPAs better. Robots.txt is your broad-stroke tool; meta tags are your scalpel. One deployment quirk: if you're on Netlify or Vercel, confirm your build process isn't generating a default robots.txt that conflicts with yours. Some build tools create one automatically. Check the actual deployed file at /robots.txt in a browser before assuming it matches your repo.