Site aliases and redirects
An alias is just an extra domain that answers for a site you already have. Your site
has one main domain, the one you created it with. Add www.example.com as an alias of
example.com and both addresses now open the same site: same content, same database,
same everything. You don't build a second site, you don't copy anything. You give one
site more than one front door.
People reach for aliases for a handful of everyday reasons:
- The
www.companion of a bare domain, sowww.example.comandexample.comboth work. (On BOA this particular one is usually handled for you automatically — see Automatic domain aliases below — but you can always add it by hand as well.) - A short, memorable domain pointing at a longer one (
acme.comalongsideacme-corporation.example.com). - Several country domains for one site (
acme.de,acme.at,acme.ch). - A domain you just bought and want to park on an existing site for now.
Everything on this page happens in the control panel you log into. There's nothing to install and no server to touch. The one thing you do have to arrange yourself, outside the control panel, is the DNS for each alias, and that's covered below.
Where aliases live
Aliases are a property of the site itself, so you manage them on the site's own edit form, not as a task in the task row.
- Open the site in the control panel.
- Click Edit on the site (this is the node edit form, not one of the task buttons).
- Scroll to the Domain Aliases section.
That section is where every alias for the site is listed and where you add or remove them. There's no separate "add alias" task and no command to run from your shell: aliases are edited here, in the web UI, and nowhere else.
Adding an alias
Under Domain Aliases you'll see one or more single-line boxes, one domain per box.
- Type the full domain into an empty box, for example
www.example.com. One domain per box, nohttp://, no trailing slash. - Need another? Click Add an alias and a fresh box appears. Add as many as you like.
- Save the site form.
When you save, the control panel queues a Verify task for the site (you'll see it appear and run in the task log). That task rebuilds the site's web configuration so the new domain is served. You don't do anything for that part, your host's system handles the web-server side for you. Give it a moment; when the task turns green the alias is live (as long as its DNS resolves, see below).
You can also fill in aliases right at the start, on the Create site form: it has
the same Domain Aliases section, so a brand-new site can come up already answering
on its www. variant and anything else you list.
Automatic domain aliases
You may also see a read-only line called Automatic domain aliases listing one or more domains you didn't add yourself. BOA fills this in for you, and there are two things that can show up here:
- The
www.(or bare-domain) companion of your own domain. BOA turns this on by default: create a site onexample.comand it automatically gains awww.example.comalias; create one onwww.example.comand it gains the bareexample.com. There's one condition — BOA only adds the companion once it resolves in DNS, so it appears after you've pointed that name at the server, not before. Because it's automatic, you don't normally need to type thewww.variant into the boxes yourself. - A subdomain of a host-wide domain. Some hosts also switch on a "temporary" address — a subdomain of a domain the host owns — that your site always answers on, handy while you're still pointing your real domain's DNS at the server.
Everything in this Automatic domain aliases line is generated on the server side,
so it's read-only: you can't add or change these entries from here. If the line is
empty, it simply means nothing has been generated for the site yet (for the www.
companion, most often because its DNS doesn't resolve to the server yet).
Removing an alias
- Open the site's Edit form and find the Domain Aliases section.
- Clear the box for the alias you want gone (empty it out).
- Save.
The Verify task runs again and rebuilds the config without that domain. From then on the removed domain no longer opens your site.
One thing removing an alias does not do: it doesn't touch your DNS. The A or CNAME record you created for that domain is yours, set up at your DNS provider, and the control panel never manages it. If you're done with the domain, tidy up its DNS record separately.
Picking your primary domain and redirecting the rest
By default an alias is a true alias: whichever address a visitor types stays in their address bar, and the site answers on all of them equally. That's fine for many setups, but for SEO and for a tidy, consistent address you usually want one domain to be the canonical one and every other domain to bounce visitors to it.
That's what the Redirect all domain aliases to setting does. It's a dropdown in the same Domain Aliases section, and it offers:
- No redirection — every domain answers on its own address, nothing bounces. This is the default.
- Your main domain — the site's primary domain is listed by name. Choose it and
every alias sends visitors on to your main domain with a proper redirect. This is the
usual choice: pick
example.comand a visit towww.example.comlands onexample.com. - Any one alias — each alias is also offered by name, in case you want a specific alias to be the address everything settles on instead of the main domain.
Pick the domain you want visitors to end up on, then save. The Verify task rebuilds the config and the redirects take effect. The redirect is a permanent one, so browsers and search engines learn the canonical address.
A quick note on the setting: it's one choice for the whole site, applied to all of the site's aliases together. There's no per-alias switch in the control panel, so you can't redirect one alias while leaving another as a plain alias. It's all-redirect (to the domain you chose) or all-plain.
The DNS you have to set up
This is the one piece that isn't in the control panel, and it's the most common reason an alias "doesn't work." Every alias needs a DNS record pointing at the same server your site is on. At your DNS provider, add either:
- an A record for the alias pointing at the site's IP address, or
- a CNAME record for the alias pointing at your site's main domain.
Use whatever your main domain already uses, and copy that. If example.com resolves to
the server, point www.example.com at the same place.
The control panel doesn't check or manage DNS for you. It happily accepts an alias with no DNS yet, so you can add the alias first, but the domain won't actually open your site until its DNS is set and has propagated. DNS changes can take anywhere from a few minutes to a while, depending on your provider and the record's TTL, so if a freshly-added alias doesn't respond right away, give it time and re-check the DNS before assuming anything's wrong.
If your DNS is a wildcard (for example *.example.com already points at the server),
then subdomain aliases under it, like shop.example.com, resolve automatically and
don't each need their own record.
HTTPS on your aliases
If your site has HTTPS turned on, remember that each alias is a separate domain and needs to be covered by the certificate too, or visitors to that alias will see a security warning. The good news is this is usually automatic: once an alias resolves in DNS, the certificate can be re-issued to include it. Turning on HTTPS and how the certificate covers your domains has its own topic, HTTPS for your sites, so head there for the details.
When an alias won't behave
A short checklist for the usual snags, in the order worth trying:
- The alias opens something other than my site (or a default page). Almost always DNS. Confirm the alias has an A or CNAME record pointing at the same server as your main domain, and that it's finished propagating. Then re-open the site's Edit form, check the domain is still listed under Domain Aliases, and save to let Verify run once more.
- The alias works but my main domain now redirects to it (or vice-versa). Check the Redirect all domain aliases to dropdown. Whatever you picked there is the domain everything ends up on. Set it to the domain you actually want as canonical, and save.
- I added my main domain into the aliases list and things loop or behave oddly. Your main domain is already the site's primary address, it doesn't belong in the aliases boxes. Remove it from there and let Verify run again.
- A security warning on the alias over HTTPS. The certificate doesn't cover that domain yet. Make sure the alias resolves in DNS, then re-issue HTTPS (see HTTPS for your sites).
If you've checked all of that, the DNS is correct and propagated, and an alias still won't serve your site, that points at something on the server side that isn't yours to adjust. Open a support request with your host, tell them the site and the exact alias domain, and they'll take it from there.
Where to go next
- The rest of this topic, including creating sites, everyday site tasks, platforms, and cloning, lives in Managing sites and platforms.
- Turning on HTTPS and how the certificate covers your aliases is in HTTPS for your sites.
- The exact task and field names are collected in the shared Reference.