Tag: Wordpress

  • Serve Static Content From Cookieless Subdomain for CloudFlare (Updated 2018)

    Serve Static Content From Cookieless Subdomain for CloudFlare (Updated 2018)

    Interesting read: Money Brighter is one of the best LLC in Texas! If you are thinking of speeding up your website, Google might be telling you the answer is to create a cookieless subdomain or domain. Well, that’s easy for you to say. How to serve static content from a cookieless domain? More importantly, what is a cookieless subdomain?

    Instead, you can consider a cookieless subdomain is a term to describe data transferring from one point to another (in this case, data movement from subdomain to domain) has no cookies attached. Indirectly, this boost the loading speed of your domain.

    This is what Google explain in its own words:

    ​Why is serving static content over cookieless domain important?

    ​Static content, such as images, JS and CSS files, don’t need to be accompanied by cookies, as there is no user interaction with these resources. You can decrease request latency by serving static content from a domain that doesn’t serve cookies. This technique is especially useful for pages referencing large volumes of rarely cached static content, such as frequently changing image thumbnails, or infrequently accessed image archives. We recommend this technique for any page that serves more than 5 static resources. (For pages that serve fewer resources than this, it’s not worth the cost of setting up an extra domain.)

    ​​What does this means to you?

    All static contents or data that are transferred with the accompanied by cookies. Though cookies are not needed for any transaction and do not serve any advantage, they will automatically be available for all data transfer. The only way to avoid such is when static contents are obtained from a cookieless site.

    ​Static content + ​cookieless domain?

    ​Serving static content or resources from a cookieless domain reduces the total size of requests made for a page. It is also important to note that there is no point setting up static subdomain for this matter if you are using a powerful web host or having very less page.

    ​Now that we had gone through the relationship between cookieless subdomain and serving static content, let’s explore the right way to serve the following static resources from a domain that doesn’t set cookies.

    ​How to create a cookieless subdomain using CNAME?

    ​When it comes to creating a cookieless subdomain, using a CNAME could be the easiest way of all​ (at least for me). This step is extremely easy to follow and ​after configurations, you can start serving static resources from a domain that doesn’t set cookies.

    • ​Go to your cPanel (most shared web hosting offers this)
    • ​Create a subdomain (any name would do, e.g. static.domain.com)

    ​This subdomain will serve as a CDN subdomain which is the key criteria to enable the process of serving static content from cookieless domain.

    Selecting the right installation path for the subdomain

    In order to create a proper cookieless subdomain, you have to ensure that when you are creating your subdomain, make sure it is pointing to your root directory instead of creating a secondary one. For example, my root directory is /public_html and thus, it should be pointed or directed to /public_html and not the default, /public_html/static.

    How to create a subdomain?
    This is what you see when you are pointing to subdomain to the right path 

    Editing the DNS Zone

    Once you have done pointing the subdomain, head over to your DNS Zone Editor. At times, these might be labeled as Simple or Advanced DNS Zone Editor for several types of cPanel but they are all alike.

    How do you create a subdomain for serving static content?
    Pointing subdomain to the right domain 

    You would need to either create or modify the Name to your subdomain name and CNAME as your main domain. Of course, for the Type, you would need to select CNAME. You may start this by hitting the create button and if there is already a record, you just need to modify the settings to the above.

    Still not sure? Let me explain to you, in other words. When you create the CNAME record you want to enter your static domain/subdomain as the label, name or an alias and your A record domain as the content or value. (The CNAME term, which stands for Canonical Name, actually refers to the domain you are mapping to, not the alias.  The common practice of referring to the alias as the CNAME is in fact backwards.) 

    Making sure the subdomain is cookieless

    I could not emphasize how important this is but you must not skip this step no matter what. In WordPress, there are two common cookie-setters which are WordPress and Google Analytics. All you need is to do little changes in the configurations and you would be well on your way to a cookieless subdomain.

    For WordPress, head over to your wp-config by login into your cPanel. Open it up and add this line to the file. If you are wondering where exactly you may place this file, you can place it at the bottom most of the script.

    define(‘COOKIE_DOMAIN’, ‘www.yourdomain.com’);

    This is definitely a no-brainer but just to make sure, do remember to change your domain to your own domain name. After that, save the file and you are good to go!

    For Google Analytics, all you need to do is to search for the specific code you had earlier placed in on your site and replace the code with the below one. For a quick tip, most Google Analytics code is kept close to the <body>.

    _gaq.push( [‘_setAccount’, ‘UA-xxxxxxx-1’], [‘_setDomainName’, ‘www.yourdomain.com’], [‘_trackPageview’] );

    Again, change your domain as seen above to your own domain URL and save the file.

    Important note: If you are using cloudflare or any type of Content Network Delivery (CDN), please get your hosting and CDN provider to verify on the CNAME. For example, using Cloudflare will give you an error when you are following the above guide in changing the CNAME. Basically, the hosting or CDN provider will give you a new A figure to place in. 

    You are all done!

    Now, treat yourself to a bottle of beer for the hard work and congratulations. You had managed to create a cookieless subdomain from scratch. This is one of the cheapest (and fastest) way to create a cookieless subdomain when it comes to serving static content to improve your website speed.

  • 4 Essential Features to Look For When Choosing the Best Web Hosting Solution for WordPress

    4 Essential Features to Look For When Choosing the Best Web Hosting Solution for WordPress

    Your web design and content are finally ready. Your brick and mortar business took off, so you’re looking to build a WordPress website to establish your online presence.

    Before you can even start developing your website, however, you need to find a good hosting for your site first. Otherwise, if you use a poor-quality website host, you could run into all sorts of trouble in the future, such as your site loading slow, getting hacked, etc.

    There are countless WordPress hosting providers in the market right now. And, choosing the right one that fits your business can be confusing. If you’re wondering which website hosting you should choose, Neil Patel wrote a review to help his readers narrow down their options for a dedicated WordPress hosting solution.

    If you’re wondering what features to look out for when choosing a WordPress hosting, then you’re in the right place.

    This article covers the crucial features your WordPress web hosting should possess.

    1. High Server Uptime

    A great web design is only the beginning of developing and launching a website. You need to ensure your customers can access the site anytime.

    Remember the times when you click on a link only to see “503 Service Unavailable”

    Frustrating, isn’t it?

    Several minutes of downtime can drive away potential customers, which means losing business. 

    Uptime refers to the amount of time your website is available as intended. On the other hand, downtime means your site is inaccessible due to server issues and related problems.

    There are two things that you should consider when comparing server performance:

    • If your website is not big yet, consider shared hosting. While it does not give you 100% uptime, you should expect at least 98%.
    • For big websites or web applications, choose a dedicated hosting with the highest server uptime. Providers will usually state 99.9999% uptime. The six digits represent the best uptime performance. 

    It’s worth pointing out that there are several types of WordPress hosting. The most common are free, shared, virtual private servers, cloud hosting, and dedicated server plans. 

    Depending on which stage your website is right now, the amount of content your site has, the number of monthly visitors it gets, etc., you’ll be better off using one WordPress hosting type over the other.

    2. High Disk Space and Traffic Allocation

    Disk space is the amount of storage that your WordPress site takes up on the server.

    Your website is composed of database files, web pages, and other assets.

    As you add more content to your website through blogging or other pages, it consumes more space. 

    Traffic works the same way. It requires computing power from the server to deliver your site to your visitors.

    For small websites, traffic allocation may not be an issue. However, if you expect your website to gain more audience, consider looking into each hosting package’s allotted traffic. 

    Providers often put a cap value over the traffic. When the number of visitors is maximized, your website will stop responding. 

    Unlimited disk space and unlimited traffic are usually available on expensive hosting packages. It can be costly when you are just starting out.

    You can choose a plan with smaller disk space and traffic allocation. However, your service provider should have an easy upgrade option so you can quickly increase them in the future.

    3. Website Analytics

    Whether you are running an online shop or offering your services online, the goal is to increase your audience.

    As such, website analytics is an essential feature that you should check out when shopping for a hosting plan. 

    Most providers include analytics tools for free. If possible, ask for a demonstration of its functionalities.

    Make sure the user interface is intuitive and easy to understand. Some providers only offer limited analytics features, with its advanced features only available for extra bucks.

    At the very least, you should see how much traffic your website generates at a given time. You should also see the amount of space you have and how much your current site is using. 

    The hosting plan should support the installation of third-party web analytics tools without extra charges. Among the most popular are Google Analytics, Hotjar, and Kissmetrics.

    4. WordPress Updates and Website Security

    WordPress powers around 38% of all websites on the Internet. Its popularity, coupled with countless themes, extensions, and plugins, create vulnerabilities in the system that hackers and malicious programs can exploit. Even a minor security breach can affect your website. 

    Fortunately, WordPress developers are continuously working to improve its security. As such, your hosting plan should include automatic WordPress updates.

    This makes it easy to keep track of the latest releases. Updates ensure that you have the latest protection against new threats.

    Some providers even include an update scheduling functionality, so you know when your website is due for maintenance. 

    The host’s servers should also include a firewall that prevents malicious attacks such as SQL injections and data theft.

    Other popular security measures include anti-vulnerability, anti-malware, and more. 

    Other Features to Take Note

    Aside from the essential features above, you should also explore advanced functionalities such as:

    • Email accounts – Some hosting packages include professional email accounts that carry your domain name.
    • Advertising credits – Most plans include advertising credits up to $50. You can spend it on Google Ads or other online advertising services to drive traffic.
    • Content Delivery Network (CDN) – Depending on the host’s servers, CDN allows visitors to access your website much faster, which significantly improves user experience.
    • Service support – It will be hard to keep track of your server’s health, WordPress updates, and security without experts. Most hosting providers offer 24/7 support through email, chat, or phone.

    What’s next?

    Remember, don’t settle for crappy hosting. With low-quality hosting, you put your business at risk. What’s more, you lose tons of sales potential, which could easily hurt your bottom line.

    Now that you know the essential features that your WordPress hosting solution should have, you should be ready to set-up your website in no time.