This post is about the required two URLs when you're planning to configure Exchange Hybrid configuration.
If your organisation is using M365, you need to open all the required ports and URLs. But the following URLs are quite important when you're deploying Exchange Hybrid.
Microsoft 365 URLs and IP address ranges:
https://learn.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide
ews.example.com
autodiscover.example.com
Primarily required for client-server data exchange and hybrid functionalities (e.g., Free/Busy, mailbox migration).
https://learn.microsoft.com/en-us/exchange/hybrid-deployment-prerequisites#hybrid-deployment-protocols-ports-and-endpoints
Essential for clients to automatically discover server settings and configure connections
https://learn.microsoft.com/en-us/exchange/architecture/client-access/autodiscover?view=exchserver-2019
The connection depends on your environment.
If your organisation using L4 or other types of the F/W, you need to open and convey the traffics properly.
In the end, those three URLs are pointing at the Exchange server or its F/W(L4 or something)
nslookup
server 8.8.8.8
mail.example.com
ews.example.com
autodiscover.example.com
Test-NetConnection ews.example.com -Port 443 #Depends on the environment
Test-NetConnection autodiscover.example.com -Port 443
Telnet ews.example.com 443 #Depends on the environment
Telnet autodiscover.example.com 443