How to configure a subdomain to redirect to a AWS S3 page?

Hello,

I’m trying to configure a DNS to my webpage hosted at AWS S3. Since my www already is used by wordpress, I need to configure a subdomain.

I tried to follow and search many manuals (such as that), but nothing worked. At this moment, I’m receiving the error DNS_PROBE_FINISHED_NXDOMAIN, but I set the config at DNS tab:

My webpage at AWS S3 is addressed here: http://www.services.da1help.com.s3-website.us-east-2.amazonaws.com/
And I need to use the address services.da1help.com to redirect to this URL.

How to solve this problem?

Hi @bruno.macabeus,

The services record doesn’t seem to be proxied through Cloudflare. It also redirects to www.services which doesn’t have a DNS record. www.services also won’t work with SSL/TLS with Cloudflare’s Universal Certificate --> Subdomain too deep

[email protected] ~ $ curl -I services.da1help.com
HTTP/1.1 301 Moved Permanently
x-amz-id-2: JDYPwvNOV4VdQlmMmvDXSn35+W5qDRkFpagoGsCfg+Sqjbf+Ip1Rgzl+2Y3oQ/jyEqsi/hNe9Wo=
x-amz-request-id: D6650C8DD37B725A
Date: Fri, 20 Dec 2019 15:42:28 GMT
Location: https://www.services.da1help.com/
Content-Length: 0
Server: AmazonS3

Hello @domjh, thank you for the reply.

I tried enabling the Cloudflare’s proxy, and because it wasn’t working, I disabled this proxy.
And about subdomain too deep… As long I understand, it’ll only be we have two or more subdomain, but I’m using just one: services. I can’t understand why it’s redirecting to www.services!

I just activated again the proxy and now I’m receiving a different error:
Error 502
Timeout

➜ ~ curl -I services.da1help.com 
HTTP/1.1 301 Moved Permanently
Date: Fri, 20 Dec 2019 17:53:26 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Fri, 20 Dec 2019 18:53:26 GMT
Location: https://services.da1help.com/
Alt-Svc: h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
Server: cloudflare
CF-RAY: 548379c9d88ada6e-LIS

I solved my problem!

Steps:

  • switch to use DNS server 1.1.1.1 (Cloudflare’s) on my machine, in order to test faster when changes some rules
  • remove my all old buckets, and create just one called services.da1help.com and upload site files on it
  • active option to host a website on this bucket
  • upload policy to be open
  • on Cloudflare, remove my old DNS configurations and add just one:
  • add a new Page Rules to set SSL as Flexible on all pages at subdomain https://services.da1help.com/
  • on Cache tab, purge everything

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.