V
V
Vitaly2019-07-03 15:29:43
WordPress
Vitaly, 2019-07-03 15:29:43

How to redirect subdomain to https?

Hello, I have a site on Wordpress Multisite. Subdomains are implemented there. Right now there are a couple of them, but more will be added in the future. How to redirect subdomains from http to https. It would seem that the question is banal, but I can not find the answer. Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Zhuk, 2019-07-03
@Seahunter

To begin with, it is worth considering that you need a wildecard ssl certificate with support for subdomains, regular certificates (not wildcard) work only with the main domain and its www version.
Everything else is configured directly on the web server, an example for nginx:

server {
  listen 80;
  server_name *.host.com;
  return 301 https://$host$request_uri;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question