2

I've just published my website, and I realized missing www in my (BUT ONLY ON CELLPHONE) url causing this issue:

enter image description here

It is interesting fact that if I type url without www on my computer or laptop website is working fine, but if I type url without www on my cellphone, that is message that I'm getting (screenshot above).

So

"https://example.com" // causing issue (because there is no www)

"https://www.example.com" // works fine on my cellphone

I must say that I've tried editing web.config file, and I added this rule which should redirect all non www to www url, so my web.config looks like this:

<rewrite>
    <rules>

        <rule name="Canonical Host Name" stopProcessing="true">
             <match url="(.*)" />
        <conditions>
            <add input="{HTTP_HOST}" pattern="^example\.com$" />
        </conditions>
            <action type="Redirect" url="http://www.example.com/{R:0}" redirectType="Permanent" />
        </rule> 

        <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>

But I do not know what it's about, cuz it's causing issue only on cellphones looks like..

So any kind of help would be great! Thanks

Roxy'Pro
  • 4,216
  • 9
  • 40
  • 102

1 Answers1

0

If you are using https://, all your urls must be with https://. If you will use http:// this will cause errors. Additionaly, you have to setup certificate for both https://www.sample.com and https://sample.com

And check your web.config you use http insted of https

Profesor08
  • 1,181
  • 1
  • 13
  • 20