So... I just created a new CDN through CF. I'd like to know how long does it take the DNS to propagate worldwide? I tried registering the CDN that I created in CF into WPRocket but it's breaking my site. I don't know if is because of the timeframe that I need to wait or that I'm doing something wrong within the crypto config in CF.
Generally cloudflare takes 24 hours to propogate dns records through wordwide. After that website will serve request through cloudflare. And issue of your site brokedown is may be minification of jQuery or css in wp-rocket or defer parsing of script. Also you can use http://whatsmydns.net for checking DNS entries.
You don't need to configure the CDN section in WP Rocket for services like cloudflare or sucuri.
There's an addon (activated inside WP Rocket) for cloudflare where you just need to fill in your API key and that's it.
I believe you don't even need to set the addon and the API key for cloudflare to work with your website and WP Rocket, the addon is "just" for controling cloudflare directly from wordpress dashboard (purge cloudflare cache, enable development mode, etc)
Related
My landing page is a static built website on Netlify.
Then I have a subdomain, which is an A record in DNS (set in Netlify).
This subdomain is points to an external web server (nginx+Django), which provides REST API and serves static content.
The question is how can I make this subdomain to use Netlify's CDN, when serving static content from Django API?
Are there any approaches to do it?
Netlify advises against using any CDN in front of it, as it already provides CDN. As well as there'll be a problem with SSL certificate.
I tried my best to look for such a question, but I couldn’t pick the right terms, I suppose, so I didn’t find it.
I would be very grateful for any advice!
Thank you and best regards!
You can use Netlify's Proxy Rewrites: https://docs.netlify.com/routing/redirects/rewrites-proxies/ to add some level of CDN to your site. However, it will totally be upto Netlify to decide how much time your content will stay in cache. If it's not in Netlify's cache, there won't be much of a performance boost by doing this - so I'd advise against it, unless absolutely necessary.
If you have already deployed your wordpress instance to AWS, which scenario for CDN makes more sense?
Using CloudFront directly on top of a LoadBalancer.
Using CloudFront with W3 Total Cache plugin?
If you expect high volume of traffic to your WordPress website the better option will be the first one:
Using CloudFront directly on top of a LoadBalancer.
If you are in the beginning of your project the better option will be the second one:
Using CloudFront with W3 Total Cache plugin?
Also please note that you are comparing server architecture and configuration versus plugin. Which are two completely different things. These two completely different things can also work together with no issues (if configured properly of course) and you will have the next setup:
Using CloudFront directly on top of a LoadBalancer with W3 Total Cache plugin.
Another hint: if you are in the beginning of your project or not familiar how to configure complex plugin with many options such as W3TC, I would recommend you cache plugin with less options and more simple. Recently, I have started using WPCacheOn recently on all of the websites, I am using and I am very happy with it. Simply install and activate the WPCacheOn and no further configurations or settings are needed for faster website.
I hope this information helps you in choosing your setup and cache plugin for your project.
I have this:
A rails app on Heroku that servers mydomain.com
A WP site on another hosting (that I can move to AWS .. or even heroku)
I need that mydomain.com/blog serves the WP installation, I DONT want it to be a subdomain for SEO.
My first idea was setup apache / nginx as reverse proxy on a instance on AWS. However I worried that this setup is not optimal as backends are in different services.
It's possible to setup heroku dyno as a proxy? I understand there is no way to modify the system files on heroku, like create a custom nginx setup to do the proxy. I was wondering if there is some application that works as a proxy and can be installed in heroku, next setup the blog in heroku also.
Or it's a good idea to setup an AWS instance as proxy in the same region that the heroku is (us-west1), and setup the blog also there.
I'm interested in the pros and cons of each solution and what would be the best way to go.
I had tackled the same exact problem with Rails and WP for quite some time.
My configuration and result:
Rails app is hosted on heroku (www.sexycrets.com)
WP Blog is hosted on another server (blog.sexycrets.com)
When the browser requests www.sexycrets.com/blog he receives the same html page that he would have received if browsing blog.sexycrets.com and the url on the browser remains the same
How I achieved it
One solution that does works well for SEO is to use a gem as reverse proxy (I use drewwed/rack-reverse-proxy from Github). You can configure it to intercept the route "/blog" (and "/blog/") so that every time Rails is asked for /blog it loads your WP site with a backend call and returns it to the user. This is a completely transparent operation from the user browser perspective, aside from the delay introduced. The user browser has no way to know that the blog page returned in the response was loaded from another server, the url on the browser remains "www.sexycrets.com/blog".
Pros: SEO requirements are satisfied
Cons: Performance since the reverse proxy is not very performant in terms of delay introduced
Alternative
For sake of completeness the other option I tried was to use an iFrame in a static page hosted on heroku that loads the WP. The problem is that in order for it to work avoiding a circular reference all the links in the WP blog have to point to blog.sexycret.com (not www.sexycrets.com/blog) which partly defeats the SEO purpose.
Pros: Performance is very good since it is not even using Rails: the user browser loads the static /public/blog/index.html page that contains just the iFrame that points to the WP blog
Cons: the links in the blog are not pointing to the main domain but to the 3rd level domain defeating
Hope this helps!
What I would like to do
According to a Amazon Senior Architect to whom I spoke recently, it is possible to cache dynamic website content in Amazon CloudFront.
The way I understand how this could work, is that in addition to doing a page cache of each page which has been accessed, cache the page in CloudFront too.
What I have tried
I have experimented a lot with W3 Total Cache and its settings but did not find a solution to this problem. I also have tried to set up CloudFront directly in the AWS control panel but did not find a way to cache the static result (html?) of WordPress's php calls.
Question
How would you tackle the issue?
How can I cache a static version of WordPress's dynamic pages in CloudFront or any other CDN?
Here is a concept plugin which aims to do this:
https://github.com/PeterBooker/wp-cloudfront-helper
most CDNs advertise that they can cache dynamic web sites. Unless they have very specific information about the pages they need to serve, they can't. There are situations where the "penalty" of a CDN for a dynamic page isn't that bad, but having an additional hop in-between the web server and the end user can only be faster in some very specific situations. The main reason is the absense of a Last-Modified header for the generated pages.
From my experience working with (at) CDN providers, the most performant way to include a CDN is to use a different hostname for the static assets and point that hostname to the CDN with your web server as the origin server.
Jan
When I enable Cloudflare my site's CSS doesn't get read. I turned off css/html/js minify and rocket loader in the Cloudflare settings but I still get the problem.
Are you using any other caching plugins? These might be at play as well. If you have changed your CSS file recently, however, you need to go to CloudFlare Development Mode first to bypass our cache (you would want to do this when making changes to any static content files while using CloudFlare).