Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google search console mobile useragent detected as computer #67

Open
metalwolf opened this issue Aug 3, 2020 · 0 comments
Open

Google search console mobile useragent detected as computer #67

metalwolf opened this issue Aug 3, 2020 · 0 comments

Comments

@metalwolf
Copy link

The google search console bot for mobile is detected as computer wich makes google believe the mobile sites are for PC.

func main() {

	useragent := "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

	ua := uasurfer.Parse(useragent)
	fmt.Printf("Useragent: %s\n Result: %+v\n", useragent, ua)
}

Output:

Useragent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
 Result: &{Browser:{Name:BrowserGoogleBot Version:{Major:0 Minor:0 Patch:0}} OS:{Platform:PlatformBot Name:OSBot Version:{Major:6 Minor:0 Patch:1}} DeviceType:DeviceComputer}

Could be good to detect google bots as computer or mobile as it should be

Going to fork to modify this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant