Add Googlebot User Agent to Safari Develop Menu

Googlebot Safari

If you’re like me, you’ve wanted to have the Googlebot user agent availalbe in the Develop menu of Safari.

  1. Go to /Applications/
  2. Right-click on Safari.app and select Show Package Contents
  3. Navigate to Contents/Resources/
  4. Find `UserAgents.plist`
  5. Open `UserAgents.plist` in your favorite text editor
  6. Either
    • Replace with the contents of this file and continue to step 9: [download id="12"]
    • … or continue on:
  7. At the end of the file, find:
    </array>
    </plist>
  8. Replace with:
    	<dict>
    		<key>separator</key>
    		<true/>
    	</dict>
    	<dict>
    		<key>name</key>
    		<string>Googlebot</string>
    		<key>version</key>
    		<string>2.1</string>
    		<key>platform</key>
    		<string>Googlebot</string>
    		<key>user-agent</key>
    		<string>Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)</string>
    	</dict>
    	<dict>
    		<key>name</key>
    		<string>Bing</string>
    		<key>version</key>
    		<string>2.0</string>
    		<key>platform</key>
    		<string>Bingbot</string>
    		<key>user-agent</key>
    		<string>Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)</string>
    	</dict>
    </array>
    </plist>
    
  9. Save the file (you’ll need to type in your user password)

Voila! Now in your Safari Develop > User Agent menu, you should see `Googlebot 2.1 – Googlebot` and `Bing 2.0 – Bingbot`.