#Cloudflare Domain with Pages, not resolving www.

9 messages · Page 1 of 1 (latest)

woeful vine
#

Hi, I have a simple site running on pages right now and I bought a cloudflare domain. When I set the custom domain the DNS settings confused me. It currently only works when I go to customdomain.com. It does not work when I go to www.customdomain.com. How do I adjust the DNS Settings to do that?

abstract zephyrBOT
#
Support AI

To enable your custom domain to work with both customdomain.com and www.customdomain.com, you need to configure your DNS settings.

According to the Cloudflare documentation (https://developers.cloudflare.com/pages/configuration/custom-domains/), you should add a CNAME record for your desired subdomain, in this case, www.customdomain.com.

Here's how to do it:

  1. Log in to your DNS provider.
  2. Add a CNAME record for www.customdomain.com.
  3. Set the content of the CNAME record to <YOUR_SITE>.pages.dev.

The table below illustrates the CNAME record setup:

Type Name Content
CNAME www.customdomain.com <YOUR_SITE>.pages.dev

After adding the CNAME record, your custom domain should work with both customdomain.com and www.customdomain.com.

#
Support AI

It seems like you're trying to set up a custom domain for your Cloudflare Pages site. To point your custom domain to your Pages site, you'll need to configure a CNAME record.

According to the Cloudflare documentation, you can follow these steps to configure a custom domain for your Pages site:

  1. Go to the Cloudflare dashboard and select your account and domain.
  2. Go to the "DNS" tab and click on "Add a record".
  3. Select "CNAME" as the record type.
  4. Enter the name of your subdomain (e.g. "www" or "@") and the value of the CNAME record (e.g. "nassaucountygrievance.pages.dev").
  5. Click "Save" to save the changes.

You can refer to the documentation on Point to Pages with a custom domain (Source: https://developers.cloudflare.com/rules/origin-rules/tutorials/point-to-pages-with-custom-domain/) for more information on how to configure a custom domain for your Pages site.

Please note that you may need to adjust your DNS settings according to your specific setup and requirements. If you're still having trouble, you can try rephrasing your query and I'll try to help again.

woeful vine
abstract zephyrBOT
#
Support AI

According to the Cloudflare documentation, any changes or additions you make to your Cloudflare zone file will take effect globally within 5 minutes, usually much less. However, depending on the Time-to-Live (TTL) set on the previous DNS record, old data may still remain cached until the TTL expires.

For proxied records, the TTL is set to 5 minutes ("Automatic") by default. If you've set a custom TTL for your DNS record, it may take longer for the changes to take effect.

You can refer to the documentation on DNS Troubleshooting FAQ (Source: https://developers.cloudflare.com/dns/troubleshooting/faq/) for more information on how DNS changes are propagated and how TTL affects the propagation time.

Please note that it's usually a good idea to wait for at least 5-10 minutes for the changes to take effect, and then try accessing your custom domain again. If you're still having trouble, you can try rephrasing your query and I'll try to help again.

woeful vine
abstract zephyrBOT
#
Support AI

The "Connection timed out Error code 522" error typically occurs when Cloudflare is unable to establish a connection to your origin server within the allowed time.

According to the Cloudflare documentation, this error can be caused by a variety of issues, including:

  • The origin server is not responding or is taking too long to respond
  • The origin server is blocking Cloudflare's IP addresses
  • There is a firewall or other security software blocking the connection
  • The DNS settings are not configured correctly

To troubleshoot this issue, you can try the following:

  • Check your origin server's logs to see if there are any errors or issues that could be causing the connection timeout
  • Verify that your DNS settings are correct and that the CNAME record is pointing to the correct IP address
  • Check your firewall and security software settings to ensure that Cloudflare's IP addresses are not being blocked

You can refer to the documentation on Error 522: Connection timed out (Source: https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-522/) for more information on how to troubleshoot and resolve this error.

If you're still having trouble, you can try rephrasing your query and I'll try to help again.

royal fiber
# woeful vine Now when I go to www.customdomain.com I get a cloudflare error page "Connection ...

The DNS Record isn't enough for Pages.
You can either add the www subdomain as another Custom Domain in the Pages Project and have it serve the same content as your root domain (customdomain.com), or you can add a redirect from www -> root domain: https://developers.cloudflare.com/pages/how-to/www-redirect/

Cloudflare Docs

Learn how to redirect a www subdomain to your apex domain (example.com).

woeful vine
#

I just figured this out and used a redirect! Thank you!