# Put a website online

> Get a domain, run your site on a server, and serve it over HTTPS through Coritan's network and WAF, from start to finish.

Source: https://www.coritan.com/docs/get-started/put-a-website-online/

In the dashboard:

- /dashboard/welcome: https://www.coritan.com/dashboard/welcome
- /dashboard/websites: https://www.coritan.com/dashboard/websites
- /dashboard/websites/…/dns: https://www.coritan.com/dashboard/websites
- /dashboard/proxies/web: https://www.coritan.com/dashboard/proxies/web
- /dashboard/proxies/web/…/overview: https://www.coritan.com/dashboard/proxies/web
- /solutions/small-business: https://www.coritan.com/solutions/small-business

This tutorial puts a website on your own domain, such as `www.example.com`, served over HTTPS through Coritan's network with the web application firewall (WAF) in front of it. You get a domain, run the site on a server, create a *web proxy* that forwards visitors to it, and check that its certificate is live. Each section ends with something you can check before you go on.

It costs the domain's yearly price, which **View domain prices** lists in the **More website actions** menu of the **Websites** page, and the plan of the server that runs the site. The certificate and the web proxy come with no order and no invoice ([How Edge Proxy is billed](/docs/proxies/#how-edge-proxy-is-billed)). If domains, DNS or certificates are new to you, read [Domains and DNS](/docs/learn/domains-and-dns/) and [Web proxies, origins and the WAF](/docs/learn/web-proxies/) first.

Once [account plans open on your account](/docs/billing/account-plans/#plans-open-in-stages), the dashboard's [Welcome page](https://www.coritan.com/dashboard/welcome) can start this for you. Select **A website**, and the **Put your website online** dialog asks which way ([Choose what to do first](/docs/get-started/choose-what-to-do-first/)):

- **Build a new site** opens the Container Apps order page with WordPress chosen, on the cheapest plan that runs it. Order the server, then get a domain as section 1 describes and finish WordPress's setup as section 2 describes.
- **Use a site I already have** opens **Add a website** on the **Websites** page. Choose **Register a new domain** or **Use a domain I already have** and select **Continue**, which opens the dialog that section 1 describes.

## Before you begin

- A Coritan account. [Create an account](/docs/get-started/create-an-account/) if you have none, then sign in.
- To register a domain, credit on the account for the whole registration period. Coritan takes the price before it registers the domain ([Add credit to your balance](/docs/billing/add-credit/)).
- The site itself: code or files that a web server can serve over HTTP.

## 1. Get a domain

Register a new domain, or add one you already own. Either way, Coritan hosts the domain's DNS *zone*, its list of records.

To register a new domain:

1. In the dashboard, go to [Websites](https://www.coritan.com/dashboard/websites) and select **Register domain…**.
2. Enter the **Domain name**, such as `example.com`, and select **Search**. The dialog says whether the name is available and shows its **Price per year**.
3. Choose the **Registration period**, from 1 to 10 years.
4. Leave **Set up a proxy route** off, because you create the web proxy in section 3, once the site has somewhere to run. Leave **WHOIS privacy** on to keep your contact details out of public lookups.
5. Select **Register domain**.

To use a domain registered somewhere else:

1. In the dashboard, go to [Websites](https://www.coritan.com/dashboard/websites) and select **Add existing domain…**.
2. Enter the **Domain name** and select **Add domain**. The dialog lists the nameservers to set at your registrar.
3. Select **Open DNS**, and add the records the domain uses today, such as its mail servers, so that nothing stops working when you switch ([Add, edit and delete DNS records](/docs/websites/dns/manage-dns-records/)).
4. At your registrar, replace the domain's nameservers with Coritan's, `ns1.coritan.com` to `ns8.coritan.com`.

The domain appears in the **Websites** list. A domain you registered starts on Coritan's nameservers. For a domain you added, the list says **DNS hosted here**, and the zone answers once your registrar publishes the new nameservers: `dig NS example.com +short` then lists Coritan's ([Add a domain you already own](/docs/websites/add-an-existing-domain/#result)).

## 2. Run the site on a server

The site needs an *origin*: a server that answers HTTP requests for it. Choose one:

- A Container Apps server running Node.js or Python, chosen in the **Software** section of the order page ([Order a server](/docs/managed-containers/order-a-server/)). Your app must answer HTTP on the server's primary port.
- A Container Apps server running WordPress, chosen in the same **Software** section. WordPress keeps its content in a database, so choose a paid plan: the free plan has no databases. Once the server runs, open its **Databases** tab, select **New database…** and create one ([Databases](/docs/managed-containers/databases/)). Then open the server's address in a browser, and enter the **Host**, **Database**, **Username** and **Password** that **Show credentials** lists in the WordPress setup.
- A Cloud Compute instance with a web server that you install, such as nginx, answering on port 80 ([Get a cloud server](/docs/get-started/get-a-cloud-server/)).
- A server you run somewhere else, with a public address.

If your site is an app that you keep in git, [Apps](/docs/apps/) can build and run it instead, on your own domain with its own certificate, and you can skip the rest of this tutorial ([Run an app or a database](/docs/get-started/run-an-app-or-a-database/)).

Open `http://` followed by the origin's address and port in a browser, such as `http://203.0.113.10:80`, and check that your site answers. The **Container Apps** list shows each server's address and port, and **Copy address** on its row copies them.

## 3. Create the web proxy

1. In the dashboard, go to [Edge Proxy](https://www.coritan.com/dashboard/proxies/web) and select **New proxy…**.
2. Choose **Website or app**, then the kind of origin:
   - **A server hosted here**, for a Container Apps server. Enter the **Domain**, such as `www.example.com`, and choose the **Server**.
   - **A server elsewhere**, for an instance or any other origin. Enter the **Domain**, the origin's IP address as the **Origin host**, such as `203.0.113.10`, and its **Port**, such as `80`.
3. Leave **Request a certificate automatically** on. For **A server elsewhere**, leave **Force HTTPS** and **Web application firewall** on as well. A web proxy for a server hosted here starts with both on.
4. Select **Create proxy**.

The dashboard confirms it, such as `Proxy for www.example.com created.`, and opens the web proxy's **Overview** tab while Coritan requests the certificate. On the [Edge Proxy](https://www.coritan.com/dashboard/proxies/web) list, the web proxy's **Protection** column shows the **WAF** and **HTTPS** badges ([Create a web proxy](/docs/proxies/web-proxies/create-a-web-proxy/)).

## 4. Point the name at Coritan's network

Visitors reach the web proxy once its name resolves to Coritan's network. With the zone on Coritan, that takes a *proxied* record, which Coritan answers with the addresses of its network.

- When the name had no `A`, `AAAA` or `CNAME` record, Coritan added a proxied record for it when you created the web proxy.
- When the name already has an `A` or `AAAA` record, go to [Websites](https://www.coritan.com/dashboard/websites), open the domain and select the **DNS** tab. Edit the record and turn **Proxied** on.
- When the name has a `CNAME` record, delete it on the **DNS** tab, then add an `A` record with the origin's address and **Proxied** on.

> [!WARNING]
> Turning **Proxied** off for the record, or deleting the record, also deletes the name's web proxy with all its settings ([Web proxies and DNS records](/docs/proxies/web-proxies/#web-proxies-and-dns-records)).

On the domain's **DNS** tab, the name's record shows **Proxied**.

## 5. Check the certificate and the site

1. Go back to the web proxy's **Overview** tab. While the certificate authority checks the name, the **Certificate** card shows **Issuance in progress**. It stops checking after three minutes, so reload the page to see the result.
2. Once the certificate is active, the card offers **Renew now**. Open `https://www.example.com` in a browser.

The browser opens your site over HTTPS with no warning, and `http://www.example.com` redirects to `https://`. To serve `example.com` as well, create a web proxy for it too, and give it a whole-domain redirect to `https://www.example.com` ([Redirect the whole domain](/docs/proxies/web-proxies/redirect-rules/#redirect-the-whole-domain)).

## Troubleshooting

The browser warns that the connection is not private
: The certificate is not active yet, so Coritan answers with a certificate for another name. Read the **Certificate** card, and select **Request certificate** when the last request failed ([Request or renew the certificate](/docs/proxies/web-proxies/change-the-origin/#request-or-renew-the-certificate)).

An error page with `502` or `504`
: Coritan's network cannot reach your origin, or the origin does not answer in time. Check that the site answers at the origin's address and port, and that nothing on an instance blocks that port from the internet ([Troubleshoot proxies and join addresses](/docs/proxies/troubleshooting/)).

`A route for this domain already exists`
: The name already has a web proxy ([Create a web proxy](/docs/proxies/web-proxies/create-a-web-proxy/#troubleshooting)).

## Next steps

- [Set up email for your domain](/docs/get-started/set-up-email-for-your-domain/)
- [Protect a website with the WAF](/docs/websites/waf/): the WAF, HTTPS and development mode switches
- [Store files and backups](/docs/get-started/store-files-and-backups/), so that you can undo a bad change to the site
