In the latest instalment of the #AskGoogleWebmasters video series, John Mueller addresses a question about AJAX crawling.
Here is the question that was submitted:
“What is the current status of #! AJAX crawling? How do I set up redirects?”
The Status of Hashbang URLs
Mueller addressed the first part of the question by giving a brief history lesson on AJAX crawling.
The AJAX crawling scheme was something Google proposed ten years ago, back in the early days of JavaScript sites.
As Mueller points out in the video, ten years is one-third of the web’s entire existence. So AJAX crawling might as well be considered ancient by today’s standards.
AJAX crawling eventually became redundant as Google and other search engines learned how to render JavaScript pages as an actual browser would.
Well it turns out people are still using the AJAX crawling scheme. So to those asking about the current status of hashbang URLs, Mueller says it’s no longer necessary to do anything special.
“We’ll just try to render [hashbang URLs] directly,” Mueller said in the video.
Setting Up Redirects
Site owners will have to use JavaScript if they wish to set up redirects to a different URL structure. Server-side redirects are not possible when dealing with hashbang URLs.
It’s not possible to use server-side redirects with hashbang URLs because everything that comes after the hash symbol is not sent to the server. Instead, it’s processed on the client’s side in their browser.
So that’s why it’s necessary to use JavaScript instead of a standard 301 (server-side) redirect.
Once the JavaScript redirects are setup, Googlebot will spot them as it reprocesses the hashbang URLs and follow the redirects appropriately.
Hear Mueller’s full response to these questions in the video below:
Source: https://www.searchenginejournal.com