Redirect www to non-www

Asked

Viewed 236 times

-1

I have an SSL certificate that holds

www.dominio.com.br

dominio.com.br

Sub1.dominio.com.br

sub2.dominio.com.br

sub3.dominio.com.br

However there are links (in which I have no control) that access the sub-domains via WWW, that is, and in this case the browser displays an unsecured website message because my certificate does not cover WWW for sub-domains.

How do I create a redirect only to www sub-domains for independent non-www if access is via http or https?

I have full access to site servers and DNS.

Note: The IIS Rewrite URL module does not work because the client keeps accessing www.

1 answer

0

If these links (with www and subdomain) are with https, even if you create the redirect, you will get certificate error since you will need to open the link to identify that it is redirected.

Which httpd you are using?

  • What is httpd? A NAME (or other) entry in DNS does not work?

  • httpd would be the http daemon, i.e., web server. Some common ones are Apache, Nginx, IIS... The redirect method will vary according to the server used. It is not possible to do this redirect at the DNS level. A CNAME record, which would be the closest, would require additional configuration on httpd and would still have the invalid certificate problem for requests made via https. Another alternative to your case would be to issue a certificate covering these domains as SAN (Subject Alternative Name), which is what you should already have for the subdomains.

  • I am using IIS 8.5. What I am entitled to in this certificate and that is already registered are *.dominio.com.br and dominio.com.br

  • 1

    It is that actually, wildcard certificates have a depth limit, not working in sub-sub domains. Stackoverflow itself has suffered from this in the past: http://nickcraver.com/blog/2013/04/23/stackoverflow-com-the-road-to-ssl/ What I tell you is to correct the links, or at least remove SSL (https) of them, since without SSL at least you can redirect to the subdomain without www. With SSL, you will always have certificate errors, having no way around it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.