开发者

how to test my local page on Fetch as Googlebot

I have written a page and need to test it lo开发者_StackOverflow社区cally.

How can I see the result of my development site served from my local machine using Google's "Fetch As Google" feature in Webmaster Tools?


(disclaimer: more of a comment than an answer)

This is an excellent question and there are amazingly little sources on the web for a solution.

Fetch Google Bot - http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=158587

The Fetch as Googlebot tool lets you see a page as Googlebot sees it. This is particularly useful if you're troubleshooting a page's poor performance in search results. For example, if you use rich media files to display content, the page returned by the tool may not contain this content if Google can't crawl it effectively. You can choose to fetch a page as Google's regular web crawler sees it or, if you publish mobile content, as our mobile crawlers do.

I followed the link above and tried out User Agent Switcher but it doesn't accomplish what the asker is looking for. See this thread: chrispederick.com/forums/viewtopic.php?id=788

You can change the user agent settings to be the same as GoogleBot, for example, but I'm not sure if sites also change their appearance based on the headers the search bot sends. Changing the headers is beyond the scope of the extension, however.

And chrispederick.com/forums/viewtopic.php?id=259

Q

For example if i put googleBot i'd like it to customize that it would be emulate Google's spider.

A

The User Agent Switcher has always been designed to be a simple, light-weight solution so I'm not planning on adding anything like this.

In short I don't think there is a solution. This would be a great opportunity for a google app


Do you mean you want to see how your site will react to the google web crawler?

For this you could use Firefox with the User Agent Switcher addon.


In order to test your localhost website with the official Google tools, you can use Ngrok as i described in this post : https://www.aymen-loukil.com/en/blog-en/how-to-test-localhost-website-with-google-seo-tools/

Fetch as Google is not possible to use directly with non verified domain in Google Search Console (Webmaster tools). A trick to view it, is to iframe your Ngrok URL in a another verified domain. - you should have a website verified in Search console - Make an iframe that loads your Ngrok URL of your localhost webpage


Ngrok + Fetch as google combination is great, but you will need to go through the verification process each time you launch ngrok on the google tools side.

In my case I just needed to check if server side render was properly done, just went to google Chrome navigator settings and disabled javascript:

Settings >> Advanced >> Content Settings >> Disable >> Javascript Allowed (off)

how to test my local page on Fetch as Googlebot

It allowed me to check that the page was being 100% rendered in the server side(nextjs server side rendering) and no JavaScript render was being run on the client side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜