-2

I try to redirect my Azure web app from www.website.com to website.com and I cannot find a way. I already check many solutions online and follow the steps, like here: Redirect from non www to www, do I need two app services in azure? but no luck.

In go daddy I have:

Type   Name    Value
A      @       myIp 
TXT    @       website.azurewebsites.net 
CNAME  www     website.azurewebsites.net

and in Azure Portal I set:

-> custom domains

website.azurewebsites.net (given by default from azure)
website.com
www.website.com

-> TSL/SSL Settings

website.com
www.website.com

but still, when I go to www.website.com, I see my website but I don't get forward to website.com

Any idea what else could I do/what am I missing?

Giorgia Sambrotta
  • 1,133
  • 1
  • 15
  • 45

2 Answers2

0

You have DNS records in Godady

Type   Name    Value
A      @       myIp 
TXT    @       website.azurewebsites.net 
CNAME  www     website.azurewebsites.net

Azure WebApp cannot make redirect from www.website.com to website.com You can configure domain Redirect in Godaddy

https://www.godaddy.com/help/edit-my-domain-forwarding-19978

https://www.godaddy.com/help/forward-my-domain-12123

Andriy Bilous
  • 2,337
  • 1
  • 5
  • 16
  • thank you @Andriy Bilous. I did that but unfortunately it made my www.website.com not secure anymore. NO IDEA WHY! So before https://www.website.com and https://website.com where working fine, now https://website.com works fine. https://www.website.com give connection not secure -.- – Giorgia Sambrotta Mar 20 '21 at 09:30
  • Have you enabled HTTP -> HTTPS rediection in Azure WebApp? – Andriy Bilous Mar 20 '21 at 19:26
  • Could you please share screen with detailed error? – Andriy Bilous Mar 22 '21 at 07:30
  • there are no errors. You can go to elliotforwater.com and see by your self. https://elliotforwater.com http://elliotforwater.com both work properly http://www.elliotforwater.com -> brings you to https://elliotforwater.com BUT https://www.elliotforwater.com doesn't bring you to https://ellitoforwater.com if I try to forward from goDaddy, when I go to https://www.elliotforwater.com I get browser warnings for connection insecure. – Giorgia Sambrotta Mar 22 '21 at 11:47
  • May you please also share your Godaddy Redirect/Forwarding settings? – Andriy Bilous Mar 22 '21 at 12:15
  • Right now I'm not using goDaddy forwarding system, since was giving warning and i was losing users. I got in contact with GoDaddy service and they told me that under the hood, GoDaddy use Forward service to deal with www to non-www. GoDaddy forward has its own server which has no certificate installed. That's my the warning. I must redirect at server level, not DNS level if I want the https://www.... to work properly. – Giorgia Sambrotta Mar 22 '21 at 14:02
0

I got in contact with GoDaddy service and they told me that under the hood, GoDaddy use Forward service to deal with www to non-www. Basically, GoDaddy forward service, has its own server which has no certificate installed. That's my the warning. SSL certificate are per domain, per server.

Solution: I must redirect at server level, not DNS level if I want the www.mywebsite.com to work properly while rediretcing to non-www.

Giorgia Sambrotta
  • 1,133
  • 1
  • 15
  • 45