Google Custom Search Engine not giving the expected search result

爷,独闯天下 提交于 2019-12-23 18:53:33

问题


I have been trying to create a new google custom search engine, but when I try some query,the search engine it is not giving me the expected search result.On some queries it is working fine, but on other queries, it says"no result".

I tried adding the URL of the website that I wanted to search for, but there are certain pages and keywords that are not coming up in the search result when I try to search for the keyword of that page. I tired adding both the main page URL and the URL of the sub page that I want to search for, but nothing is working. There are some sub pages to the main URL that are coming in the search result.


回答1:


this happened to me too. It is because the url you specify to google has to match the server address where your site is stored. For example, I made a site with google custom search (mainstreetbd.com) and when I tested it on my server, the google search returned no results. But when I did it on the specified url, it works fine.




回答2:


Some webpages instruct search engines how to index their webpage in a file called robots.txt.

For example: https://stackoverflow.com/robots.txt

(If a site has one it should be under http://URL/robots.txt directly after the domain name)

If the robots.txt for the site you are trying to search excludes some parts of its site from being indexed, it could be the source of your problem.



来源:https://stackoverflow.com/questions/2595438/google-custom-search-engine-not-giving-the-expected-search-result

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!