Well, we won’t get too basic here, going all the way back to what the User-Agent is…. you can read about that here on wikipedia
I have two favorite ways to change the User-Agent, the first is via Curl…. I am a CLI guy. So here we are going to hit a little website I created that will display the user-agent https://lancegrover.com/user-agent.php
Here you see we user curl, first without any settings. Next we do the “-H” to set the User-Agent…. So it will look like this:
curl https://lancegrover.com/user-agent.php -H "User-Agent: Blah Blah Blah"
ok, good times, but sometimes we need to be able to do this in the browser…. Currently I run Google Chrome, so we will go with that. When in your browser on the website you want go ahead and press F12 to bring up the developer tools. Then select the additional menu (three dots) -> “More tools”->”Network conditions”
Now you will deselect the “Select automatically” option under “User agent” so you can either select a User-Agent or set a custom one.
Now you can select a custom one or use a pre-set one.
First we will show what it looks like before…
And here we have deselected the “Select automatically” and the Custom User-Agent set to “My custom User-Agent!!!”
Lots of reasons to change your User-Agent, if you want to display a website differently based on the user-agent or if you want to disguise what browser or who you are….lots of reasons.