https
Enable or disable the HTTP to HTTPS redirect for one domain, every domain, or every domain with a Let's Encrypt certificate
- Command:
/go/https - Category: Web server
- Required arguments:
<domain|all|live>and<action> - Output: Plain text (one line per domain, except in
allmode) - Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also
Overview
/go/https turns the HTTP to HTTPS redirect on or off. It:
- sets the
SSLRedirectflag (1or0) in GoAdmio'sSitetable - rebuilds the Apache and Nginx configuration so the change takes effect
- works on a single domain, on all domains, or only on domains that already have a Let's Encrypt certificate
- logs every run to
/var/log/go/https.log
[!WARNING] The command does not check that a valid SSL certificate exists. Enabling the redirect for a domain without a working certificate makes the site show a certificate error. Run
checksslfirst, or use thelivetarget, which only touches domains that have a certificate.
Quick start
# Redirect HTTP to HTTPS for one domain
/go/https example.com Enable
Syntax
/go/https <domain|all|live> <action>
If you run it as a non-root user, it re-runs itself with sudo.
| Target | Behavior |
|---|---|
<domain> |
Updates one domain, then rebuilds its Apache and Nginx configuration. |
all |
Updates every domain in the Site table, then rebuilds the whole configuration with conf. |
live |
Updates only domains that have a folder in /etc/letsencrypt/live and a /home/<domain>/www directory. |
Arguments
| Position | Argument | Required | Values | Notes |
|---|---|---|---|---|
| 1 | domain |
Yes | A domain, all, or live |
Pass the full domain, for example example.com. |
| 2 | action |
Yes | 1 or Enable to enable |
Anything else disables. See Action matching. |
Action matching
Only two values enable the redirect, and they are case-sensitive.
| You pass | Result |
|---|---|
1 |
Enabled |
Enable |
Enabled |
0, Disable, disable |
Disabled |
enable (lowercase) |
Disabled |
| Nothing | Disabled |
| Any other text | Disabled |
Always use 1/Enable to enable and 0/Disable to disable.
Output
| Target | What you see |
|---|---|
<domain> |
Redirecting HTTP to HTTPS Enabled for <domain>. or ... Disabled for <domain>. |
live |
The same line for each matching domain. |
all |
No message of its own. Only the output of conf appears. |
The message is printed even if the domain doesn't exist in the database. See Troubleshooting.
Examples
# Enable the redirect for one domain
/go/https example.com Enable
# Disable the redirect for one domain
/go/https example.com 0
# Enable for every domain that has a Let's Encrypt certificate (safest bulk option)
/go/https live 1
# Enable for every hosted domain, with or without a certificate
/go/https all Enable
# Turn the redirect off everywhere, for example while fixing certificates
/go/https all 0
# Review recent runs
tail /var/log/go/https.log
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Browser shows a certificate error after enabling | The domain has no valid SSL certificate. | Disable with /go/https <domain> 0, install a certificate with ssl or installssl, then enable again. |
Redirect loop (ERR_TOO_MANY_REDIRECTS) |
A proxy such as Cloudflare connects to the origin over HTTP, so the redirect repeats. | Set the proxy's SSL mode to Full or Full (strict), or disable the redirect. |
Enabled was printed but nothing changed |
The domain isn't in the Site table (typo, or an alias). The update matched no rows. |
Check the spelling and use the primary domain. |
enable didn't enable |
Matching is case-sensitive. | Use Enable or 1. |
| Ran without an action and the redirect turned off | A missing action counts as disable. | Always pass the second argument. |
live skipped a domain |
It has no /etc/letsencrypt/live/<domain> folder, or no /home/<domain>/www. |
Install a Let's Encrypt certificate, or use the domain name directly. |
all printed nothing useful |
all only runs conf, which prints its own output. |
Check the SSLRedirect value in the database, or test with curl -I http://<domain>. |
Details
What it does
flowchart TD
A["/go/https target action"] --> B{"Running as root?"}
B -- "No" --> C["Re-run with sudo"]
C --> D
B -- "Yes" --> D["Append the command to /var/log/go/https.log"]
D --> E{"Target?"}
E -- "all" --> F["Set SSLRedirect for every row in Site"]
F --> G["Rebuild all config with /go/conf"]
E -- "live" --> H["Loop over /etc/letsencrypt/live/*"]
H --> I{"/home/domain/www exists?"}
I -- "No" --> H
I -- "Yes" --> J["Set SSLRedirect for that domain"]
J --> K["Run /go/apache and /go/nginx for it"]
K --> H
E -- "domain" --> L["Set SSLRedirect for that domain"]
L --> M["Run /go/apache and /go/nginx for it"]
Steps in order
- If not root, re-runs itself through
sudo. - Appends a timestamped line with the arguments to
/var/log/go/https.log. - Reads the domain (argument 1) and action (argument 2).
- Sets
SSLRedirectto1for1orEnable, and to0for anything else. - Rebuilds the web server configuration:
Notes
- Both
apacheandnginxrun for a domain, whichever web server is active. - The
livetarget ignores non-domain entries in/etc/letsencrypt/live, such asREADME, because they have no/home/<name>/wwwdirectory. - The domain is placed directly into an SQL statement. Pass plain domain names only, with no quotes or special characters.
- The redirect can also be set when an account is created with the
--sslredirectoption ofcreate.
See also
| Command | Description |
|---|---|
checkssl |
Check if SSL certificates are installed for all domains |
installssl |
Install Let's Encrypt SSL on GoAdmio |
ssl |
Install an SSL certificate for a domain in GoAdmio |
zerossl |
Install a ZeroSSL certificate via the command line |
conf |
Rebuild the Apache/Nginx configuration in GoAdmio |
apache |
Convert a GoAdmio server from Nginx to Apache |
nginx |
Convert a GoAdmio server from Apache to Nginx |
create |
Create a GoAdmio account from the command line |