Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 939 posts 2574 karma points
    Oct 03, 2022 @ 18:51
    Claushingebjerg
    0

    umbraco 10 redirect frontend to https

    How do i force https on the frontend?

    Docs say use rewrite in web.config, but the solutions has no web.config before i do a dotnet publish...

    Mac user without Visual studio here. Pure VS code.

  • Corné Hoskam 80 posts 587 karma points MVP 3x c-trib
    Oct 04, 2022 @ 06:56
    Corné Hoskam
    0

    Hi Claushingebjerg,

    You have several options to enforce Https for the frontend in Umbraco 9/10. Option one would be to use the HttpRedirectionMiddleware in your startup.cs pipeline, which is provided out of the box! More information can be found here:

    https://our.umbraco.com/documentation/Reference/Security/SSL-HTTPS/#redirect-traffic-in-code

    Second option would still be the use of rewrite rules, because even on a Mac you can still still use them! One of the options for rewrite rules would be by reading a rewrites xml file (or any other URL Rewrite option provided by ASP.NET). Not to shamelessly selfpromote, but perhaps this blogpost could help you out if you want to go for option two:

    https://cornehoskam.com/posts/configuring-iis-url-rewrite-rules-umbraco-9 đŸ™‚

    I hope this helped!

    Kind regards, Corné Hoskam

Please Sign in or register to post replies

Write your reply to:

Draft