Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities

Imagine that you are working with AWS and you want to set up a number of external CNAME DNS pointing to your application with a certificate per CNAME.

As you can see in this graph, we have an external customer with a domain “app.domain.com” that wan…


This content originally appeared on DEV Community and was authored by mkdev.me

Imagine that you are working with AWS and you want to set up a number of external CNAME DNS pointing to your application with a certificate per CNAME.

01

As you can see in this graph, we have an external customer with a domain "app.domain.com" that wants to point with a CNAME to our internal DNS domain "company.com". But I don’t want to have just one customer, I want to have many, and many are not 10, neither 100, but many customers using my app because I want to make real money.

If I want to connect all those CNAME to an application load balancer in AWS and there is a problem because there is a limit of 25 certificates with ACM per ALB. You can find in internet crazy solutions like an ALB every 25 customers or we can use the magic of CloudFlare.

In CloudFlare, we have an option called Cloudflare for SaaS that will allow us to have this magic without the limits that we have with AWS.

First things first, we need to activate Cloudflare for SaaS in case it is not activated, and if needed, add your credit card.

When this is done, we can get started and see how simple the steps are.

In our Route 53, we are going to create a CNAME entry pointing, for example, YouTube.mkdev.me to claimora.com

02

Now, in Cloudflare, we need to set up the DNS, and for that, we need to create two rules.

The first one should be a CNAME or an A pointing to the final destination. In our case, it is going to be a CNAME pointing from proxy-fallback to our claimora URL. And it is important to name it proxy-fallback.

The second CNAME will be a wildcard to allow all the CNAMEs to point to proxy-fallback.claimora.com.

03

Now that this is done, we need to create a component called Custom Hostname, where we are going to reference the CNAME entry created previously in Route 53.

So, here we are going to create a Custom hostname called YouTube.mkdev.me that will point later to Claimora.com

04

As you can see, this component is telling us that we need to add two TXT entries in our Route 53 to be able to work. As soon as this is done and we wait a while, everything will be green.

05

And now, if we go to YouTube.mkdev.me, we will be redirected to Claimora.com, and the fantastic thing is that the SSL certificate is valid.

Now, imagine that you have all those steps automated, and your customers only need to add the CNAME and the two TXT entries in their DNS, and everything will be set up.

Here' the same article in video form for your convenience:

.


This content originally appeared on DEV Community and was authored by mkdev.me


Print Share Comment Cite Upload Translate Updates
APA

mkdev.me | Sciencx (2024-07-27T13:38:44+00:00) Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities. Retrieved from https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/

MLA
" » Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities." mkdev.me | Sciencx - Saturday July 27, 2024, https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/
HARVARD
mkdev.me | Sciencx Saturday July 27, 2024 » Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities., viewed ,<https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/>
VANCOUVER
mkdev.me | Sciencx - » Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/
CHICAGO
" » Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities." mkdev.me | Sciencx - Accessed . https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/
IEEE
" » Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities." mkdev.me | Sciencx [Online]. Available: https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/. [Accessed: ]
rf:citation
» Cloudflare for SaaS: Resolving AWS Connection Issues with Multiple CNAMEs, DNS, and SSL Capabilities | mkdev.me | Sciencx | https://www.scien.cx/2024/07/27/cloudflare-for-saas-resolving-aws-connection-issues-with-multiple-cnames-dns-and-ssl-capabilities-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.