JS crawling problem of mobile e-commerce website

Soweluyy

Newbie
Joined
Aug 12, 2024
Messages
18
Reaction score
5
I have a question. The menu bar link of my mobile website uses JS to expand the secondary directory. Can Google index the links in my secondary directory?

I have very few mobile crawls now, and there are almost no internal links on GSC.
 
Google can index links that are shown by JavaScript. If you're not seeing many mobile crawls or internal links in Google Search Console, it might be because Google is having trouble reading the JavaScript. To fix this, make sure your JavaScript is not blocking Googlebot. You can use Google Search Console's URL Inspection tool to check how Google views your site and look for any problems.
 
Google can index links that are shown by JavaScript. If you're not seeing many mobile crawls or internal links in Google Search Console, it might be because Google is having trouble reading the JavaScript. To fix this, make sure your JavaScript is not blocking Googlebot. You can use Google Search Console's URL Inspection tool to check how Google views your site and look for any problems.
Thank you for your reply. My website's desktop and mobile versions use different domain names (www. and M.). The navigation submenu is opened by triggering js in the image. I found that although all the links in the submenu are included in the page source, Googlebot does not seem to crawl them. My desktop version does not use js triggering, and the internal link crawling is normal, so I am confused.
 

Attachments

  • QQ图片20240828173018.png
    QQ图片20240828173018.png
    12.2 KB · Views: 95
Thank you for your reply. My website's desktop and mobile versions use different domain names (www. and M.). The navigation submenu is opened by triggering js in the image. I found that although all the links in the submenu are included in the page source, Googlebot does not seem to crawl them. My desktop version does not use js triggering, and the internal link crawling is normal, so I am confused.
It seems Googlebot might be having trouble with your mobile site’s JavaScript-driven submenu. Make sure your JavaScript is not blocked and is working properly, as Googlebot needs to execute it to see the links. Since you’re using different domains for mobile and desktop versions, ensure both are accessible and correctly set up in Google Search Console. Use the URL Inspection tool in GSC to check if Googlebot can view the links and look for any issues with how your site is rendered. Also, verify that your mobile site isn’t blocking any resources. Checking your server logs might help identify if Googlebot is encountering errors with JavaScript.
 
Googlebot can render JavaScript, it might not always interact with or fully execute scripts, especially if the links are only accessible after a user action. To improve indexing, consider using server-side rendering (SSR) or ensure that essential links are included in the static HTML. Also, ensure your desktop and mobile sites are correctly linked with `rel="alternate"` and `rel="canonical"` tags. Testing with Google’s tools like the URL Inspection Tool can help identify if Googlebot is missing any links.
 
Thank you for your reply. My website's desktop and mobile versions use different domain names (www. and M.). The navigation submenu is opened by triggering js in the image. I found that although all the links in the submenu are included in the page source, Googlebot does not seem to crawl them. My desktop version does not use js triggering, and the internal link crawling is normal, so I am confused.
Google can index links in your mobile website's secondary directory even if they are expanded using JavaScript (JS), but certain factors could be preventing this. Since your desktop version’s links are crawled normally without JS, the issue might stem from how the mobile site’s JS is executed or rendered by Googlebot. Ensure that the JavaScript responsible for expanding the submenu is not blocked by robots.txt and that all critical links are included in the HTML source code. If the problem persists, consider simplifying the navigation structure to ensure Googlebot can access all important links.
 
Googlebot can render JavaScript, but may not fully execute scripts, especially for user-action-dependent links. To improve indexing, consider using server-side rendering or ensuring essential links are in static HTML. Also, ensure correct desktop and mobile site linking with `rel="alternate"` and `rel="canonical"` tags. Use Google’s tools like the URL Inspection Tool to identify missing links.
 
Back
Top