1

This is the first time I build a website so I did not know anything about SEO when I started. I built many pages of my website to be rendered by React + Redux with the data received from websocket (initially my page is a html (a div essentially), then when websocket is open, depending on the URL, websocket will send message to my server to retrieve data and then the browser will re-render with the received data). Everything works fine but now I learn that Googlebot does not index contents from websocket.

I really don't want to rebuild my whole infrastructure so I did some research. I found a page from Google about dynamic rendering with Rendertron. It seems like what dynamic rendering does is it gets data from the server then serves HTML to Googlebot. I wonder whether I can use dynamic rendering to help Googlebot crawl the pages I build using websocket? Thanks

6
  • Websockets are usually used for pushing updates to pages after they are loaded. Did you use websockets for loading the page initially? That isn't what they are designed for. Aug 16 at 1:05
  • Initially my page is a html (a div essentially), then when websocket is open, depending on the URL, websocket will send message to my server to retrieve data
    – VII
    Aug 16 at 1:15
  • I wouldn't recommend using websockets like that. How hard would it be to convert the websocket to AJAX? AJAX is good a fetching the initial page load and has better browser and crawler support. Aug 16 at 12:12
  • It's doable but it will require much work. Thanks for your answer. I did some more research and it seems like there is no other way except to convert the websocket to fetch/AJAX. I have only been using fetch but not AJAX. Do you know whether Googlebot can crawl contents from fetch?
    – VII
    Aug 16 at 15:34
  • I'm not sure what "fetch" is. AJAX is pretty simple compared to websockets. It doesn't require a continuous connection to the server or having the server run ws: or wss: protocols. In general it is much easier to implement and run in a variety of environments. Aug 16 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.