How to install secure certificat (https) on Windows 11 loalhost

nickCroat 106 Reputation points


I need to test pages offline in Visual Studio, but since all of them are https I cannot open them on Windows 11:
http://localhost:51878 =>default address that I can't change and cannot open my pages online
https://localhost:44321/ => it works when I manually enter this page, but it causes problems when I debug pages

How can I add test certificate to my Windows 11?

My code web.config:
<!-- >>> UKLANJANJE WWW -->
<rule name="Canonical Host Name" stopProcessing="true">
<match url="(.)"/>
<add input="{HTTP_HOST}" pattern="^$"/>
<action type="Redirect" url="{R:0}" redirectType="Permanent"/>
<!-- <<< UKLANJANJE WWW -->
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.
)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
<rule name="Redirect 301 sa" stopProcessing="true">
<match url="(.*)"/>
<add input="{HTTP_HOST}" pattern="^$"/>
<action type="Redirect" url="{R:0}" redirectType="Permanent"/>

Internet Information Services
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,564 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,096 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,336 Reputation points


    Thank you for your question and reaching out. I can understand you are having query related to adding SSL certificate in to Windows 11.

    You can use MMC to Install certificate to Windows 11 after you have download from CA Authority.

    1. Start by typing in mmc.exe in Run to launch Microsoft Management Console.
      2,. From the top menu, click File and then click Add/remove snap-in.
    2. From the pop-up window, select Certificates under “Available Snap-ins” and then click Add.
    3. In the next window, select Computer account and click Next.
    4. Move the new certificate from the Certificates-Current User > Trusted Root Certification Authorities into Certificates (Local Computer) > Trusted Root Certification Authorities.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments