简体   繁体   中英

AWS CloudFront + CloudFlare: Using Alternate Domain Names (CNAMEs)

I have the following setup: - A WordPress Site hosted on hostgator.com - DNS managed through cloudflare.com - Amazon CloudFront used as CDN for Media, CSS & JS files (configured through W3 Total Cache WordPress Plugin)

On the pingdom.com Website speed test I get the message "This page makes 43 parallelizable requests to "mydomain.com". Increase download parallelization by distributing these requests across multiple hostnames." So this is what i'm trying to accomplish.

Amazon CloudFront is already working and serving files like this "1234567.cloudfront.net/wp-content/.../image.png". Now I want to parallelize hostnames and have something like "static1.mydomain.com, static2.mydomain.com etc."

I added those CNAMEs to my CloudFront Distribution and also to CloudFlare like this: "static1.mydomain.com is an alias of 1234567.cloudfront.net"

I assume it should be working now or am I missing something?

CloudFront should serve files to any domain alias that is setup in the distribution 'alias' list section. Read the fine print to see how to separate between multiple aliases. Once you set it up and save, add the domain aliases to cloudflare and you should get the same file response on both aliases.

Note: in the last 12 months or so, we had significant improvements in how modern browsers fetch files and domain sharding is now considered a thing of the past .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM