3.1.10. Web redirect
Web redirect allows you to organize a redirect to another address without having a site on the hosting.
Important points:
- The web redirect works over both HTTP and HTTPS.
- The domain for which the web redirect is enabled must be served on our NS.
- The redirect only works for the main domain with www and without www. The rest of the subdomains will work unchanged.
- When the web redirect is enabled, the specified DNSrecords type A and AAAA for main domain with www and without www will be ignored.
Customization
- Open the section "Domains ".
- Select the required redirect option, enter the target address in the field "URL for redirect" and press "Save":
- "Do not use web redirect" - select if web redirect should be disabled.
- "Direct redirect" - select if you want the 301st redirect to the specified URL... In this case, the address in the visitor's browser will also change to this URL.
- "Hidden redirect" - select, if you want, so that when accessing the domain, its address in the visitor's browser does not change, and the content of the specified URL loaded into a frame that occupies the entire area of the page. When choosing this option, it should be borne in mind that not all sites allow displaying their content in a frame.
- "Redirect requests to a similar page on the specified site" — check the box if you want the redirect to be performed not to the main page of the target site, but to the same page that was accessed.
- "Redirect requests for non-www domain only" - check the box if you want the redirect to be performed only for the main domain without www (for example, when the main domain is directed to one service, and the www subdomain to another).
- Wait approximately 30-60 minutes for the changes to take effect.
Alternative redirect methods
If a web redirect is not suitable for the task at hand, then you can use other options. If you have the ordered hosting service, you can organize a redirect in one of the ways.
Using a separate site
- Disable web redirect, if enabled.
Using the aliases of an existing site
- Disable web redirect, if enabled.
- Youwrite new certificate from Let's Encrypt by ticking the added aliases.
- V root directory existing site edit the file .htaccess and add a redirect directive to another site at the beginning of it. Examples of directives:
- From one domain to another:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?fromwhere.com [NC] RewriteRule ^(. *) https: //www.goda.com/ [L,R=301]
Instead
fromwhere.com
substitute the domain, from which a redirect should be performed (it was added as an alias), and instead ofwww.куда.com
— on which. - From multiple domains to one another:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?(fromwhere1.com|where2.com) [NC] RewriteRule ^(. *) https: // where.com/ [L,R=301]
Instead
fromwhere1.com
andfromwhere2.com
substitute domains, from which a redirect should be performed (they were added as aliases), and instead ofwww.куда.com
— on which. - From several domains to several different ones:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www.)?fromwhere1.com [NC] RewriteRule ^(. *) https: //www. where1.com/ [L,R=301] RewriteCond %{HTTP_HOST} ^(www.)?fromwhere2.com [NC] RewriteRule ^(. *) https: //www. where2.com/ [L,R=301]
Instead
fromwhereX.com
substitute the domain, from which a redirect should be performed (it was added as an alias), and instead ofwww.thereX.com
— on which.