How to redirect https://abc.com to https://www.abc.com using rewrite rules?

Vamshi mohan Dharanikota 0 Reputation points
2025-03-13T12:04:31.7833333+00:00

How can the URL "https://abc.com" be redirected to "https://www.abc.com" using rewrite rules?

Please advise!

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,140 questions
{count} votes

Accepted answer
  1. Praveen Bandaru 850 Reputation points Microsoft External Staff
    2025-03-13T13:29:33.5566667+00:00

    Hello Vamshi mohan Dharanikota

    Greetings!

    I understand that you are looking to create a redirection rule in the application gateway.

    For a URL rewrite, Application Gateway modifies the URL before sending the request to the backend, without altering what users see in their public browser since the changes are hidden.

    For a URL redirect, Application Gateway sends a redirect response to the client with the new URL, requiring the client to resend its request to the new URL, which updates the URL visible in the browser.

    User's image

    Application Gateway can redirect traffic using a generic redirection mechanism, allowing redirection from one listener to another listener or to an external site. This simplifies application configuration, optimizes resource usage, and supports new redirection scenarios, including global and path-based redirection.

    If you configured www.abc.com in the same application gateway with another listener.

    User's image

    Check the below public document for more understanding Gateway request routing rules

    And also check the redirection rule public document: Application Gateway redirect overview


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    If you have any other questions or are still running into more issues, let me know in the "comments" and I would be happy to help you. 

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.