An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
Azure Application Gateway Error:80
I have deploy two apps in azure app service, for backend pool of Application gateway
- webservice001
- webservice002
and all configuration is fine but the problem is that when i paste the Public IP address of Application gateway in URL for testing the desire site mean "webservice001" accessed but at the end of of that site :80 comes you have to remove manually and than press enter than you can access the webservice001.
my problem is that after hitting the Public IP address of Application gateway it must open the webservice001 automatically, but here i have to remove :80 from the site manully every time than press enter and than it will go to weservice001.
thanks in advance
Azure Application Gateway
Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
-
Vidya Narasimhan • 2,126 Reputation points • Microsoft Employee
2022-07-27T13:54:11.557+00:00 Hi ShahMuhammed-9882,
Are you trying to access the app gateway IP using HTTPS?
If so, please check whether your app gateway routing rule and http settings are configured to use port 443 and not 80. -
KapilAnanth • 49,876 Reputation points • Moderator2022-07-29T14:01:40.747+00:00 Hi @Shah Muhammad ,
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you are trying to reach a website hosted in App Gateway via the format "<PublicIPofAppGateway>"Can you please let me know if you are able to access the website like the below,
- http://<PublicIpOfAppGateway>
- https://<PublicIpOfAppGateway>
It is quite possible that "webservice001" is running on HTTPS and you are trying to access the website via "https://<PublicIpOfAppGateway>:80" but the service is running in Port 443 (HTTPS port).
Please confirm the above.
Thanks,
Kapil. -
Shah Muhammad 66 Reputation points
2022-08-23T09:25:52.333+00:00 thank you soo much for you response no i run the application on port 80 not on port 443 SSL.
when i hit the address of application gateway access the server with low latency but the problem is that i have to
remove :80 than it access the site i want to direct access...
if the same lab i configure with IIS in vm there is no issue with same configuration i am surprise where is the errors plz -
Vineet Kumar Gupta • 161 Reputation points
2022-11-01T13:51:48.09+00:00 On the Configuration tab, you'll connect the frontend and backend pool you created using a routing rule.
Select Add a routing rule in the Routing rules column.
In the Add a routing rule window that opens, enter the following values for Rule name and Priority:
Rule name: Enter myRoutingRule for the name of the rule.
Priority: The priority value should be between 1 and 20000 (where 1 represents highest priority and 20000 represents lowest) - for the purposes of this quickstart, enter 100 for the priority.
A routing rule requires a listener. On the Listener tab within the Add a routing rule window, enter the following values for the listener:Listener name: Enter myListener for the name of the listener.
Frontend IP: Select Public to choose the public IP you created for the frontend.
Accept the default values for the other settings on the Listener tab, then select the Backend targets tab to configure the rest of the routing rule.[quick-create-portal][1]
Follow this below link step by step
https://learn.microsoft.com/en-us/azure/application-gateway/quick-create-portal -
Laymar Santelices • 0 Reputation points2023-07-09T08:40:11.6033333+00:00 Have anyone answered this ? I have the same question
-
Laymar Santelices • 0 Reputation points2023-07-09T08:43:49.9466667+00:00 Hi sir, I have the same problem. Everything I've check was on port 80 - HTTP
no 443 or HTTPS configured and still it has :80 at the end of my url after pasting the public IP of my application gateway -
Anonymous
2023-11-28T15:26:18.65+00:00 Did anyone find a fix to this? Im running into the same issue
-
KapilAnanth • 49,876 Reputation points • Moderator2023-11-29T04:14:00.11+00:00 This should not be the case.
Can you explain your set up thoroughly?
- Listener configuration
- HTTP Settings configuration
- and Backend Pool.
-
Anonymous
2023-11-29T07:58:16.69+00:00 Sure, I have a App Gateway WAF V2 configured for both pubic and private IP for my Azure Web Application.
Listeners:Public
Private
Rules:
Public
Private
Backend Pool:
Backend Settings
This is my configuration, please let me know if i have missed something, currently, entering my Public IP Address leads to the site xxxx.azurewebsites.net:80, but it doesnt not work with the port 80 at the end, if i delete this from the URL in the browser it will then work.
Thanks
-
KapilAnanth • 49,876 Reputation points • Moderator2023-11-30T04:57:01.9766667+00:00 The URL changing to "xxxx.azurewebsites.net:80" means the traffic is no longer going via App gateway
- There was a redirect and traffic is directly going to the WebApp
- If the traffic were going via App gateway, the URL would remain as "http://<PublicIPofTheAppGateway>"
You must first troubleshoot this.
Refer : Azure Host Name Preservation.
And, does your site even support HTTP traffic to begin with?
- If not, the traffic would be redirected to HTTPS.
Also, I see your site requires authentication.
- It's quite possible that your Authentication provider is redirecting to a URL with Port 80, i.e, "xxxx.azurewebsites.net:80"
Make sure you follow the recommended best practices and use a custom domain for both App gateway and App service.
Cheers,
Kapil.
-
Anonymous
2023-11-30T13:51:44.5+00:00 Hi, I resolved this by disabling "https only" in the Web Services under Configuration>General Settings>HTTPS Only == Off and clearing cache/ using incognito.
The website works with only HTTP now!
Trying to use HTTPS in the backend setting of this:
Leads to this error when accessing the public IP
I have also created a service endpoint in the vnet that the application gateway is on but still get the same error
-
KapilAnanth • 49,876 Reputation points • Moderator2023-12-06T09:22:20.8466667+00:00 Thanks for keeping us updated.
As mentioned, your site was not supporting "HTTP" and once you enabled HTTP support, the issue was resolved.
Wrt 502 Bad Gateway, please refer to the below:
- NSG, UDR, or custom DNS is blocking access to backend pool members.
- Backend VMs or instances of virtual machine scale sets aren't responding to the default health probe.
- Invalid or improper configuration of custom health probes.
- Azure Application Gateway's backend pool isn't configured or empty.
- None of the VMs or instances in virtual machine scale set are healthy.
For information about scenarios with 502 , see Troubleshoot Bad Gateway errors.
Cheers,
Kapil
-
Zeeshan Nasir Bajwa 1,116 Reputation points2026-06-22T15:17:38.1066667+00:00 The issue happens because the Host Name isn't being preserved correctly, causing the App Service to append port
:80during internal redirects.The Short Fix:
Go to your Application Gateway in the Azure Portal.
Open your Backend Settings (HTTP Settings).
Set Override with new host name to Yes.
- Select Pick host name from backend target and save.
Make sure to test this in an Incognito/Private window afterwards to avoid browser cache.
Was this issue already resolved for you earlier, or are you still trying to troubleshoot it?
-
JuliaMarvin • 20,905 Reputation points • Volunteer Moderator
2026-06-22T15:25:31.9333333+00:00 @Zeeshan Nasir Bajwa
Please do not resurrect old threads.