As per the answer from Jeff to the question Why does the Stack Overflow sitemap.xml use a user-agent whitelist instead of a blacklist?:
I agree that checking the user-agent wasn't enough. I added a reverse DNS check as well.
So the short answer is, you can't.
The long answer is, if you have a valid reason to be accessing it - lets imagine you work for ...
As seems, Stackoverflow blocked users to access their sitemap but I figure it a way to get access to there sitemaps(and hope to not delete my account :) )
Here is my solution:
Go to Google Rich Results Test
Enter sitemap URL like https://stackoverflow.com/sitemap.xml
Click on Test URL
The page will be rendered and you will face the error:
Page not ...
As can be seen at How does Stack Overflow protect its sitemap?, the Stack Overflow sitemap is enormous and shows the last 50,000 questions on the site, and it is specifically mentioned that it used to use up many gigabytes of bandwidth for incorrect retrievals.
A 404 is returned because of restrictions in place to ensure only legitimate crawlers have access ...
Click questions and sort by votes https://stackoverflow.com/questions?sort=votes. That will give you the top-voted question on SO.
Bonus: Go to the last page to see the worst questions on SO (link will probably be invalid soon b/c of the pagination): https://stackoverflow.com/questions?page=62239&sort=votes