In the recent Google I/O 18, there is a session about making your JavaScript-powered websites search friendly. A list of best practices, useful tools, and Google policy change was discussed.
3. Create Search Friendly Content
1. Make sure your URL is crawlable
- use robots.txt
2. Utilize canonical tag
- Tag the source document as
canonical
3. Keep the URL clean and unique
- Don’t list session information
4. Provide Google with a sitemap
- Googlebot has a link to crawl
5. Use history API
- no more hashbang (#!) tag
6. Anchor tag and HREF attributes
your links
- Googlebot won’t recognize it
otherwise
4. What we know about Googlebot rendering
1. Googlebot uses the Chrome 41 browser for rendering
2. Rendering of JavaScript Websites in Search is deferred
3. Two-phase indexing
- First indexing- before the rendering process is complete
- Second indexing - after final render
- The second indexing doesn't check for canonical tag
- The indexability, metadata, canonical tags and HTTP codes of your web
pages could be affected.
5. There are four types of rendering
1. Client side rendering
- Rendering happens on the browser of users or on a search engine.
2. Server side rendering
- Rendering happens at your server.
3. Hybrid rendering (the long-term recommendation)
- Pre-rendered HTML is sent to users and search engine. Then, the server adds JavaScript on top of that.
4. Dynamic rendering (the policy change)
- This method sends client side rendered contents to users while search engines got server side rendered
content.
- This works in the way that your site dynamically detects whether its a search engine crawler request.
8. You need dynamic rendering
if...
1. You have a large and constantly
updated website.
2. You rely on a lot of modern
JavaScript functionality.
3. Your site has social media or chat
application that needs access to
your content.
You don’t need dynamic
rendering if...
1. Googlebot can index your page
properly.
9. Has Googlebot indexed my website correctly?
1. Fetch as Google on Google Search Console.
2. Run a mobile friendly test.
3. Check the developer console.
4. Run the rich result test.
10. Some good news for the future...
1. Rendering will be moved closer to crawling and indexing.
2. Googlebot will be using a more modern browser.