A2oz

How do I setup domain forwarding in Cloudflare?

Published in Website Development 2 mins read

Setting up domain forwarding in Cloudflare is straightforward. You can redirect your domain to another website or a specific page using Cloudflare's DNS settings.

Steps to Setup Domain Forwarding in Cloudflare:

  1. Log in to your Cloudflare account: Access your Cloudflare dashboard using your login credentials.
  2. Select the domain: Choose the domain you want to configure for forwarding.
  3. Navigate to DNS settings: Click on the "DNS" tab in the left-hand sidebar.
  4. Add a CNAME record: Click on the "Add Record" button and select "CNAME" as the record type.
  5. Enter the details:
    • Name: Enter the subdomain you want to forward (e.g., "www").
    • Type: Select "CNAME".
    • Value: Enter the fully qualified domain name (FQDN) of the website or page you want to forward to (e.g., "example.com").
    • TTL: Leave the default TTL value.
  6. Save the changes: Click on the "Save" button to apply the changes.

Example:

Let's say you want to forward "www.yourdomain.com" to "example.com". You would add a CNAME record with the following details:

  • Name: www
  • Type: CNAME
  • Value: example.com
  • TTL: Default

After saving the changes, all traffic to "www.yourdomain.com" will be redirected to "example.com".

Additional Tips:

  • You can also use an "A" record for forwarding to an IP address.
  • Cloudflare provides a "Forwarding" option in the DNS settings, which allows you to forward the entire domain or a specific subdomain.
  • You can use the "Proxied" setting to enable Cloudflare to handle the forwarding request, enhancing security and performance.

Related Articles