Your progress0 of 55 complete

Course · Lesson 3 of 7

Launching a website

Your website is ready. Now visitors need to reach the new server. Learn how HTTP and HTTPS work, what status codes tell you and what to check before a move.

  • 18 minutes
  • 6 quiz questions

After this lesson, you can

  • explain the difference between HTTP and HTTPS
  • recognise certificate problems and mixed content
  • use an HTTP status code to decide where to investigate
  • point the web records for @ and www to the new server
  • explain why you lower the TTL a day in advance
  • explain what happens when you change nameservers

HTTP and HTTPS: talking to the website

DNS helps the browser find a server. The browser then asks that server for a page. The rules for this conversation are called HTTP: Hypertext Transfer Protocol. A protocol is a set of rules that lets computers understand each other.

The browser sends a request, such as “Give me the page /contact.” The server sends back a response. Images, fonts and other files are fetched through requests too.

HTTPS is HTTP over a secure connection. The S stands for Secure. The technology securing the connection is called TLS. It encrypts the data and protects it from changes in transit. Plain HTTP does not provide that protection.

With HTTPS, the browser also checks the certificate: does it cover the domain name, is it still valid and is the issuer trusted? A secure connection does not mean the website's content is honest. A fake website can have a valid certificate too.

A request and a response

A simplified version of the conversation, including when it travels over HTTPS:

Browser → server: GET /contact
Server → browser: 200 OK + the contact page

GET means: retrieve something. 200 is the HTTP status code: three digits that describe what happened to the request. The browser uses the response to display the page or take another step.

What does an HTTP status code mean?

The first digit identifies the group. The same codes apply to HTTP and HTTPS.

  • 1xx: an interim response; processing continues.
  • 2xx: the request succeeded.
  • 3xx: another step is needed, such as following a redirect or using a cached copy.
  • 4xx: this request cannot be fulfilled, for example because the page is missing or access is not allowed.
  • 5xx: something went wrong on the server or another server it relies on.

These are the codes you will often see when building websites:

CodeMeaningWhat to check
200Success: the requested page is returned.Is it the right page?
301 / 308The address has moved permanently.Do you reach the correct new address?
302 / 307A temporary redirect.Is the move really temporary?
304Not modified: use the cached copy.This is not an error.
401Valid authentication credentials are missing.The sign-in.
403Access denied.Permissions and security rules.
404Not found.The path, link and page.
410Intentionally gone, probably permanently.Should the page stay gone?
429Too many requests.Reduce the request rate.
500An unexpected server error.The website's error log.
502An intermediary received an invalid response.The upstream server.
503Temporarily unavailable.Overload or maintenance.
504An intermediary waited too long for a response.The upstream server's availability and speed.

A redirect means making another request

A redirect gives the browser a new address. It then requests that address. For example:

/old-contact-page → 301 → /contact → 200

That is normal. If two addresses keep redirecting to each other, they form a loop. Eventually, the browser stops with a “too many redirects” error.

307 and 308 preserve the request method. With 301 and 302, a browser may change a POST request, such as a form submission, into GET. That difference matters for forms.

A 404 is a response, not a DNS error

A 404 means you received an HTTP response from a server. Check that it is the right server and that the page exists there. A failed DNS lookup, such as SERVFAIL, or a certificate warning happens before the normal HTTP response. Recognising the error helps you investigate the right part.

Your site is ready at the new hosting provider. First, check that the server recognises your domain name and serves the correct site. Then update the website's DNS records. Moving DNS to Cloudflare too? Prepare the records there, then change the nameservers at the registrar.

Before moving the site

  • Save all current records, including values and TTLs. Use an export or clear screenshots. Write down how to switch back to the old server.
  • Lower the web records' TTL well in advance, for example to 300 seconds. After lowering it, wait at least the old TTL before moving. Was it 86400 seconds (one day)? Wait at least one day after lowering it. An answer already cached keeps its old lifetime. Five minutes is no guarantee that everyone sees the new site.
  • Check the A, AAAA and CNAME records for @ and www. An old AAAA record can still send visitors to the old server. Does www follow the root domain through a CNAME? Then it follows the change automatically.

Set up HTTPS before switching

HTTPS encrypts the connection to the website. The server needs a valid certificate for your domain name. Ask your host how to arrange it before the move, for example through DNS validation. Test both the root domain and www. A certificate warning is an error to fix.

With or without www

Choose one main address and configure the web server to redirect the other one to it. DNS only helps visitors find the server; it does not create that redirect. Both names need DNS records and certificate coverage.

HTTPS needs to keep working

Certificates expire

A certificate has an expiry date. Let your hosting provider or certificate software renew it automatically. Ask who receives alerts when renewal fails, and check after a move that renewal still works.

Renewal also requires proof that you control the domain. DNS validation needs access to update the relevant DNS records; HTTP validation needs a reachable validation URL. A DNS or hosting change can disrupt this.

  • Expired certificate: ask the host why renewal failed and have a new certificate installed.
  • Wrong domain name: check that the certificate covers the name being visited, such as www.example-bakery.nl.
  • Untrusted issuer: ask the host to check the certificate chain. The browser must be able to trust the issuer.

Fix the cause. Do not ask visitors to ignore a certificate warning.

Mixed content: HTTPS with insecure resources

The page opens over HTTPS but tries to load a script, image or other file over HTTP. This is called mixed content: secure and insecure requests on the same page.

Page: https://example-bakery.nl/contact
Script: http://example-bakery.nl/form.js
Result: the browser blocks the script

Scripts and stylesheets loaded over HTTP are blocked. The browser tries to upgrade some other resources, such as certain images, to HTTPS. If that fails, the resource is still missing.

  1. Open the developer tools' Console and look for “Mixed Content”. The message identifies the problematic address.
  2. Update the address in your website, theme or settings to a working HTTPS URL. For your own files, a relative path such as /form.js also works.
  3. Check that the file is actually available over HTTPS. Refresh any relevant caches and test the page again.

An HTTP-to-HTTPS redirect is not enough for blocked resources: the browser may stop the request before it reaches the server. Learn to use browser tools in lesson 7.

Moving to Cloudflare? Bring all DNS records. Prepare the whole zone in Cloudflare, including email records and subdomains. Check DNSSEC before changing nameservers at the registrar. Old DNS answers may remain cached for a while. Lesson 6 walks through the move.

Check email too. Does MX point to the same hostname as your website, or does SPF use the a mechanism? A new web address can then affect email. Test the contact form after the move. Use your own domain for the sender and put the visitor's address in Reply-To.

Quiz

What to remember

  • HTTP defines requests and responses. HTTPS secures that conversation with TLS.
  • A status code tells you what happened to a request: success, redirection or an error.
  • Check the web server, HTTPS and all web records: A, AAAA and CNAME.
  • Save the old settings. Lower the TTL in advance and wait out the old TTL.
  • Check whether email uses the same hostname. Test the contact form after the move.
  • Renew certificates automatically and load HTTPS pages' resources over HTTPS too.
Sources and further reading

Based on the Dutch course reviewed on 25 November 2026. These sources are in English.