3 ms·
How do you ensure that Google is able to index it? Do you sniff the user-agent and serve it a pre-rendered view of the discussion thread?
by saurabhnanda 13y ago
How do you ensure that Google is able to index it? Do you sniff the user-agent and serve it a pre-rendered view of the discussion thread?
- ludwigvan 13y agoSee https://news.ycombinator.com/item?id=5198934 https://news.ycombinator.com/item?id=5198934 > Our site is indexable by Google and it doesn't do much fancy. On certain URLs, we generate a small HTML view of the content in the <noscript> tag. You can see this by viewing source or disabling JS in your browser. It's just a simple ERB template in Rails, and uses the same object graph that we serialize via Active Model Serializers. > Google can see it and index it, we've confirmed by searching post launch. > As time goes on we'll probably work more on it to make the SEO even better. As you can imagine it was tough to do when we were in stealth mode ;) Maybe we could get an update from eviltrout on that.
- EvilTrout 13y agoHonestly the reason I haven't written about it is because I didn't write it! Sam did a great job, and he did it in a super short period of time. I was leaving it to him to explain how it works :)