Must Use Page Rules on Your Domain
Articles,  Blog

Must Use Page Rules on Your Domain


[Music] in this video we’ll look at how paid rules can help you hard in security enhance performance and reliability improve user experience and minimize bandwidth usage on your domain SSL is enabled by default in the crypto section of CloudFlare while this enables your domain to take advantage of SSL paid rules allows you to enforce all visitors connect to your domain securely to accomplish this create a page rule for HTTP that includes an asterisks before and after your domain and select add a setting always use HTTPS this URL pattern that includes HTTP with an asterisks before and after your domain ensures any subdomains directories or query strings referencing your domain will be forced over HTTPS once you click Save and deploy new and returning visitors attempting to connect to your domain over HTTP will be redirected to HTTPS keep in mind that this option should generally be the first rule in your set unless you have a special case be sure to reorder the rule to appear at the very top of your page rules an additional benefit of enforcing a secure connection is that your domain will be able to utilize HTTP 2 which offers performance gains like header compression server push and more to avoid duplicate content penalties that can dilute your search engine ranking page rules allows you to define the canonical version of your domain with 301 forwarding if you wanted to define the route as the canonical version of your domain create a page rule that includes the following add your domain excluding the protocol scheme which will cover both HTTP and HTTPS the forwarding URL setting is set to 301 permanent redirect from an SEO standpoint 301 redirects will pass the ranking power to the redirected page you’ll notice my destination URL includes a secure protocol scheme and I’m using a dollar sign one for the directory to match the asterisks in the URL pattern one corresponds to the first asterisks in the URL string from left to right if I had an asterisk before the domain and want it to match it I would use a dollar sign to instead once I hit save and deploy my url pattern will be redirecting accordingly with paid rules you can redirect URLs in a number of ways both internally and externally in this example I’m using a 301 permanent redirect to create a user friendly URL for a page that shows search results for a blog post category using a 302 temporary redirect in the following three examples I’m using my domain to redirect various social media properties certain sections of a website like the login or admin section have different security and performance requirements in your general public facing pages with page rules you can target these directories for some very specific settings by using an asterisk without a slash in the URL pattern I’ll be matching not only this directory and associated query strings but also be able to target subdirectories in here as well to increase the security of the admin section I’ve set the security level to high this controls how high a client threat score must be in order for the client to encounter a challenge page threat scores are derived from our IP reputation database and are assigned to clients that attempt to connect to a resource on your domain to ensure smooth operations within my admin pages I’ve set the cache level to bypass or CloudFlare will not cache any of the content within this section I’ve also disabled any apps and performance settings that may conflict with some of the unique functionality in my admin pages certain resources on your domain will likely not change often taking advantage of aggressive caching options can significantly reduce the load on your server and bandwidth utilization in this example I’m targeting a folder that holds the majority of my image assets as well as some other types of multimedia browser cache TTL instructs the users browser on how often it should attempt to request new content from CloudFlare since the media in this folder doesn’t change often a day is a good setting for my needs cache level cache everything will tell CloudFlare to cache absolutely everything within these directories and not just a default types this can include content like HTML movie files JSON data and more by leveraging an edge cache TTL setting is seven days i’m tellin’ CloudFlare to only request new versions of this content from my origin server after set days this setting alone significantly impacts both my server load and bandwidth usage if I want to force a refresh before this time I can use to purge cache feature in the caching section of the dashboard there may be certain areas on your domain that rarely change and are critical to your organization like the contact or the our team page for these types of pages I’ve set the following rules browser cache TTL has been set to a day I’ve enabled the always online feature for these pages if my origin server were to go down CloudFlare will serve up pages from cache so visitors will still see the content since my pages are heavily reliant on static content the cache level is set to cache everything to make sure that all the content including HTML is preserved in cache finally I’ve set a very aggressive edge cache TTL to a month which instructs CloudFlare to only request new versions of the content from my origin server after a month by following the page rules outlined in this video your domain could take better advantage of cloud fleurs features that increase the security performance and reliability of your property need more rules CloudFlare now offers the ability to purchase additional page rules Alucard be sure to visit the paid rules section of your dashboard so you can optimize CloudFlare for your domain [Music]

Leave a Reply

Your email address will not be published. Required fields are marked *