Copied to clipboard

Flag this post as spam?

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


  • Henrik Sunesen 84 posts 281 karma points
    May 08, 2019 @ 15:59
    Henrik Sunesen
    0

    Redirect from https non www to https www

    Hello all,

    I have a problem getting my domain to do the right redirect.

    My main domain should be https://www.domain.com.

    I'm using Unoeuro for hosting and have made a http -> https 301 from their tool, and that works fine.

    http://www.domain.com -> https://www.domain.com WORKS http://domain.com -> https://www.domain.com WORKS https://domain.com -> https://www.domain.com FAILS

    Any suggestion to resolve this issue?

  • Marc Love (uSkinned.net) 447 posts 1789 karma points
    May 08, 2019 @ 16:17
    Marc Love (uSkinned.net)
    100

    Hi Henrik,

    Add the following to your web.config file located at the root level of your website:

    <system.webServer>
    <rewrite>
    <rules>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
     <match url="(.*)" />
     <conditions>
     <add input="{HTTPS}" pattern="off" ignoreCase="true" />
     </conditions>
     <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
     </rule>
     </rules>
    </rewrite>
    </system.webServer>
    
  • Henrik Sunesen 84 posts 281 karma points
    May 08, 2019 @ 17:05
    Henrik Sunesen
    0

    That's not working for me :/ still just get the "This site can’t be reached" error.

    I've also tried to deactivating the redirects from unoeuro's page, but that doesn't solved the problem.

  • Marc Love (uSkinned.net) 447 posts 1789 karma points
    May 08, 2019 @ 18:10
    Marc Love (uSkinned.net)
    0

    Hi Henrik,

    Your web host may not have IIS redirect tool installed. You should check that this feature is available, if its not they may have an alternative method, since you have mentioned they have a tool for 301 redirects.

    Cheers,

    Marc

  • Henrik Sunesen 84 posts 281 karma points
    May 08, 2019 @ 18:14
    Henrik Sunesen
    0

    I have access to the IIS manager for my solution

  • Henrik Sunesen 84 posts 281 karma points
    May 08, 2019 @ 20:00
    Henrik Sunesen
    0

    I resolved the issue by disabling the unoeuro redirects, resetting the dns, and then use the webconfig practice. thx ;)

Please Sign in or register to post replies

Write your reply to:

Draft