Here’s a situation that happens more often than it should. Your site gets rebuilt as a fast JavaScript app, every click updates the URL in the address bar, and the dev team calls it SEO-friendly because “look, real URLs!” Then you paste one of those URLs into a fresh tab and get a blank screen or a 404.
So is pushState good for SEO? Yes, but only when every URL it creates is a real page. Good pushState SEO means each URL loads directly from the server with a 200 status code and its own content, title, and canonical, and is linked with a normal <a href>. PushState itself only changes the address bar, so it can’t make anything crawlable on its own.
That gap between “the URL changed” and “Google can index it” is where most JavaScript sites quietly lose traffic. In this guide, I’ll walk you through how Google really handles pushState URLs, a step-by-step setup, which states deserve a URL at all, and why AI crawlers make all of this more important in 2026.
PushState URL Checker
Paste the raw HTML of any pushState URL and see what Googlebot and AI crawlers get before JavaScript runs.
Runs entirely in your browser. Nothing you paste is sent anywhere. Tool by Wahaj Ansari.
What pushState Actually Does (and What It Doesn’t)
PushState adds a new entry to the browser’s history and swaps the URL in the address bar without loading a new page. According to MDN’s pushState documentation, the browser won’t even try to load that new URL after the call, and the URL has to be on the same origin as the current page. That’s it: no content fetch, no title change, and definitely no message to Google. Everything else in pushState SEO is your job.
I like to think of it this way. Your site is a hotel, and users clicking around your app are guests already inside who take the elevator to room 214 without any trouble. Googlebot never rides your elevator, though. It walks up to the front desk and asks for room 214 directly, and if the front desk (your server) says “no such room”, it doesn’t matter what number is painted on the door.
Why pushState Replaced Hashbang URLs
If you’ve read older pushState SEO guides, you’ve probably bumped into the #! era (and if you haven’t, lucky you). Google proposed an AJAX crawling scheme built on those URLs in 2009, then stopped recommending it in October 2015 and pointed site owners to progressive enhancement and the History API instead. Today Google’s URL structure guidelines are blunt about it: don’t use fragments to change page content, because Google Search generally doesn’t support them.
So if your site still loads different pages behind /#/ URLs, that’s your first fix, before anything else in this post. Here’s the difference in plain terms, because the hash version looks like separate pages to a user but behaves like one page to a server and to Google:
| Hash URL (/#/running-shoes) | pushState URL (/running-shoes) | |
|---|---|---|
| What the server receives | Only / | The full path /running-shoes |
| How Google treats it | Ignores the fragment, so it’s basically / | A separate URL it can crawl and index |
| Shareable and linkable | Barely | Yes |
| Server setup needed | None | Every path must return real HTML |
Notice that last row. Clean URLs aren’t free: the moment you switch from hashes to real paths, your server has to answer for every single one of them.
How Google Crawls and Renders pushState Pages

Google never moves through your app the way a user does. It requests each URL directly, renders it in a fresh browser, and indexes what it finds, so a pushState URL only counts if it works as a standalone page.
This is where the hotel analogy stops being cute and starts being useful. Here’s what Google’s own documentation says about how Googlebot behaves, and you’ll notice none of it involves riding the elevator:
- It finds pages through links. Google’s link best practices say it can generally only crawl a link if it’s an <a> element with an href attribute, so a button that calls pushState on click is invisible.
- It doesn’t click. Google’s pagination guide says its crawlers don’t click buttons and generally don’t trigger JavaScript that needs a user action.
- It starts fresh every time. Google’s JavaScript troubleshooting guide notes that local storage, session storage, and cookies are cleared across page loads, so a URL that only works because of earlier navigation won’t work for Googlebot.
- Rendering waits in a queue. Per Google’s JavaScript SEO basics, a page can sit in the render queue for a few seconds or longer, and pages with a non-200 status code might not get rendered at all.
Put those four together and the picture gets very clear. Every pushState URL is judged as if someone typed it into a brand-new browser window with zero history behind it. That’s the part most people miss about pushState and JavaScript SEO: they assume Google gets the smooth in-app version, when it actually gets the cold-start version.
PushState SEO Implementation: Step by Step
A solid pushState SEO implementation comes down to five habits: real links, URLs that load on their own, honest status codes, unique metadata per URL, and a working back button. Here’s how I’d set it up, in this order.
1. Keep every link a real <a href>
Your router can intercept clicks all it wants, as long as the link underneath is a normal anchor with a real URL. This is the same pattern Google shows in its JavaScript SEO basics guide: a plain link that JavaScript upgrades with pushState. Here’s a simplified version:
<a href="/running-shoes">Running shoes</a>
<script>
document.addEventListener('click', (event) => {
const link = event.target.closest('a[href^="/"]');
if (!link) return;
event.preventDefault();
renderView(link.pathname); // load and show the new content
history.pushState({}, '', link.pathname);
});
</script>
If JavaScript fails, the link still works. If a crawler reads the HTML, it still sees /running-shoes. That’s progressive enhancement, and honestly, it’s most of the trick.
What you want to avoid is a <div> or a <button> that only navigates when clicked, or an anchor with no href at all. Those look like links to users and look like nothing to a crawler.
2. Make every URL load directly from the server
Every URL you push into the address bar is a promise that the page exists. Bing’s AJAX guidance put it simply back in 2013: any URL created by pushState should work directly, including on refresh. Test it the dumb way: copy the URL, open a private window, paste it, and hit enter.
How you keep that promise matters too. Google recommends server-side rendering, static rendering, or hydration, and calls dynamic rendering a workaround rather than a long-term solution. If your framework supports server rendering or static generation (Next.js, Nuxt, Astro, SvelteKit and friends), use it for every page you want to rank.
3. Return honest status codes
Here’s the pushState SEO trap nobody warns you about. The quick fix for refresh 404s is a catch-all rule that serves index.html for every path, and as the Vue Router docs point out, your server then stops reporting 404 errors because every missing path gets the app shell. So /this-page-never-existed returns a 200, Google sees an empty error screen, and Search Console starts filling up with soft 404s.
Google’s JavaScript SEO basics gives two fixes. Either redirect with JavaScript to a URL where the server returns a real 404 (like /not-found), or add a noindex robots meta tag to error views with JavaScript. Just never put noindex in the original HTML of pages you do want indexed, because Google may skip rendering once it sees it, which means removing it with JavaScript later may not work.
4. Update the title, description, and canonical for every URL
If every route shares the app shell’s title, Google sees fifty pages all called “My App”. Google confirms you can set or change the <title> and meta description with JavaScript, so update both every time you push a new URL.
The canonical tag needs more care. Google processes canonicals both before and after rendering, so its JavaScript SEO documentation recommends setting the canonical in the original HTML and keeping JavaScript from changing it. If you can only set it with JavaScript, leave it out of the raw HTML entirely and make sure exactly one canonical exists after rendering.
The classic bug here is an app shell with the homepage hardcoded as its canonical. Every pushState URL then tells Google, very politely, that it’s a duplicate of your homepage.
5. Handle the back button
This one is for users more than Google, but it still matters. When someone hits Back, the browser fires a popstate event, and your app needs to listen for it and render the matching view. Skip it and the URL changes while the page stays frozen, which is a great way to make people leave.
I once came across a JavaScript-based eCommerce website where the development team had implemented history.pushState() to create clean URLs for product categories and filtered pages. Everything worked perfectly for users, but organic visibility was another story. Several important URLs were either returning 404 errors when opened directly or showing the same content and metadata as the homepage. As a result, search engines were struggling to discover and index the actual pages.
I took responsibility for investigating the issue from an SEO perspective. I started by checking important URLs in Chrome DevTools, comparing their HTTP status codes, raw HTML, and rendered content. I also used Google Search Console's URL Inspection tool to understand how Google was rendering these pages and identify indexing problems.
Instead of recommending a complete website rebuild, I worked on a practical implementation plan with the development team. We fixed server-side routing so every important pushState URL could load independently, replaced JavaScript-only navigation with proper HTML anchor links, and ensured each page had its own relevant title, meta description, and canonical URL. I also addressed soft 404 issues, excluded unnecessary filter combinations from indexation, and tested browser refresh and back-button functionality.
The result was a much more search-engine-friendly website architecture. Important URLs became accessible independently, duplicate metadata issues were addressed, and crawlers could discover meaningful pages without relying entirely on user interactions. My biggest takeaway was that changing a URL with JavaScript doesn't automatically make it indexable. The server must be able to deliver a real page behind every important URL.
PushState URL Optimization: Which States Deserve Their Own URL?
Not every click deserves a new URL. Give a state its own clean URL only when it shows distinct content someone might search for, and keep cosmetic states like sort order, open tabs, or scroll position out of indexable URLs.
Let me give you an example. Say you run a shoe store, where /running-shoes and /running-shoes/womens are pages people actually search for, so they get real paths and real links. Sorting by price, switching to grid view, or opening a size guide are not, and pushing a crawlable URL for each one just multiplies near-duplicate pages.
Search engines have been saying this for years, and it’s still the most overlooked part of pushState SEO. Bing’s 2013 guidance said fewer URLs is better, and its own example kept a music player’s pause position after the # instead of in a new query parameter. Google’s faceted navigation guide agrees, suggesting URL fragments for filters you don’t want crawled, a consistent filter order for the ones you do, and a 404 for filter combinations with no results.
That’s why I treat PushState URL optimization as a decision first and a technical task second. Before any state gets a crawlable URL, I’d run it through this checklist:

- Would someone search for this exact view? If not, it doesn’t need an indexable URL.
- Does it show content that’s meaningfully different from another URL? Same products in a different order don’t count.
- Will the URL show the same thing two weeks from now? Google’s older infinite scroll guidance specifically warns against relative-time parameters like days-ago.
- Is the URL readable and stable? Use descriptive paths or key=value parameters, which Google’s ecommerce URL guide recommends, and remember that guide treats /product/t-shirt#black and /product/t-shirt#white as the same page.
Infinite Scroll and Load More: Where pushState Earns Its Keep
Infinite scroll is the one place where pushState SEO really pays off, because it lets a single scrolling page map to a series of real, paginated URLs. The scrolling is for users, and the paginated URLs are for crawlers.
Google’s 2014 infinite scroll recommendations laid out the pattern: build a paginated series where each component page has a full URL that works without the same cookies or history, then use pushState for actions that feel like turning a page. Google has since marked that post as outdated, but its current pagination guide keeps the core rules: give each page a unique URL, link to the next page with <a href>, and don’t make page one the canonical for the whole series.
Here’s why this matters so much. Google’s crawlers don’t click your “Load more” button, so /blog?page=7 has to exist as a real, linked page or everything on it is effectively hidden. Picture a blog with 300 posts behind a Load More button and no paginated links, and ask yourself how many of those posts Google can actually reach.
AI Crawlers Don’t Run Your JavaScript (So pushState Alone Won’t Get You Cited)
Most AI crawlers read only the raw HTML your server sends, so a pushState URL that needs JavaScript to show its content looks blank to them. If you want your pages quoted in ChatGPT or Perplexity answers, the content has to be in the server response.

A December 2024 study by Vercel and MERJ found that none of the major AI crawlers it tested rendered JavaScript, including OpenAI’s GPTBot, OAI-SearchBot, and ChatGPT-User, Anthropic’s ClaudeBot, and PerplexityBot. The exceptions were Google’s Gemini, which uses Googlebot’s infrastructure, and AppleBot. That study is almost two years old now, so check your own server logs, but I wouldn’t bet my traffic on these bots suddenly learning to render.
This changes the whole JavaScript pushState SEO picture. Googlebot will eventually render a client-side page, but an AI crawler requesting /running-shoes gets whatever your server returns, and if that’s an empty app shell, you simply don’t exist in that answer. Server-side rendering used to be a nice-to-have for Google, but for AI search visibility it’s the whole game.
How to Test Your pushState URLs in 10 Minutes
Testing pushState URLs means checking each one the way a crawler sees it: loaded cold, with its status code, raw HTML, and rendered HTML side by side. Most pushState SEO problems show up in this check, and you don’t need a fancy tool to find them.
Pick five URLs that matter (a category, a product or article, a filtered view, and a paginated page) plus one made-up URL that shouldn’t exist. Then run each one through this routine:
- Load it cold. Paste it into a private window. If you see a blank page, a 404, or your homepage, the server isn’t keeping its promise.
- Check the status code. Open the Network tab in your browser’s DevTools and reload. Real pages should return 200, and your made-up URL should return 404, not 200.
- Read the raw HTML. Use View Source, not Inspect. This is roughly what AI crawlers get, so your main content, title, and canonical should already be there.
- Compare the rendered HTML. Google recommends the URL Inspection tool in Search Console or the Rich Results Test for checking how it crawls and renders a page. Confirm the title, canonical, and main content match what you expect.
- Click through, then refresh. Navigate inside the app, then hit refresh on every view. Each one should land on exactly the content you just saw.
After that, keep an eye on the Page indexing report in Search Console. A sudden jump in soft 404s, or in pages where Google picked a different canonical than yours, is usually a pushState SEO problem showing up a few weeks late.
FAQs
What’s the difference between pushState and replaceState for SEO?
PushState adds a new history entry, while replaceState updates the current one. For pushState SEO, neither method changes indexing by itself, since Google doesn’t follow your browser history at all. What matters is whether the URL you set works as a real page. Use pushState for actions that feel like moving to a new page, which is exactly what Google’s infinite scroll guidance recommended, and replaceState for small updates that shouldn’t pile up behind the Back button.
Can I use pushState to show a prettier URL than the real one?
You shouldn’t. Whatever sits in the address bar is what people bookmark, share, and link to, so if that pretty URL redirects or doesn’t exist on the server, you’ve created broken links or redirect chains. Bing called this out as a common mistake back in 2013. Fix the real URL structure on the server instead of painting a nicer number on the door.
Does Bing index pushState URLs?
Yes, Bing has recommended pushState over hashbang URLs since 2013, with the same condition Google has: every pushState URL must load directly and show the same content a user sees. Bing also warned against cloaking, so don’t serve crawlers a different version of the page than people get.
Should I switch from pushState to the Navigation API?
You can, but it won’t change your rankings by itself. The Navigation API became Baseline Newly available across major browsers in early 2026, and it’s a cleaner way to handle client-side routing than pushState plus popstate. The pushState SEO rules still apply, though: crawlable links, URLs that load directly, honest status codes, and content in the HTML.
Final Thoughts
PushState is just the number painted on the door. Whether that number means anything depends on what your server does when Googlebot, an AI crawler, or a customer with a shared link walks up to the front desk and asks for that room.
So if you’re an SEO working with a dev team on a JavaScript site, don’t argue about frameworks. Ask one question for every URL the app creates: does it load on its own, with a 200, real content, and its own title and canonical? Good SEO for pushState websites is mostly getting that answer to yes, over and over again.
Get it right for every URL and pushState SEO stops being a mystery. It’s just good, boring technical SEO, done in JavaScript.
Discover more from Wahaj Ansari
Subscribe to get the latest posts sent to your email.
