The question is asked so many times over the Internet. How to make a WordPress Website SEO Friendly?
Alright, there is no guarantee to get your website ranked #1 in Search Engines as there are many of reasons and factors are involved to get higher rankings, but you can try to make your website SEO Friendly at least on page optimization is need to be done. Here we can discuss some topics to make sure you enabled those before submitting your website to Search Engines.
Permalinks and Robots.txt
One of my WordPress website was not in Google after couple of months not even the home page crawled, while investigating further I notice that is blocked in search engines with robots.txt. WordPress has ability to block or unblock your website using robots.txt for search engines, make sure you have unchecked the following (showing on image). Go to Settings >> Reading
This is so important step if you missed it your website won’t crawl in search engines, this is directly connected to robots.txt file, lets talk about robots.txt file, what is this and how it can be improved.
Robots.txt is an txt document located under root folder of website website where wp-admin and wp-content folder exist if it is not there it is recommended to create one, the editing to this file is quite simple, below are some examples of robots.txt tags have a look below:
User-agent: * Disallow: /
This means all the robots are blocked crawling this website, please note there are lots of robots who crawl your website like Google Search, Bing, Yahoo and many this the line mentioned above is telling all search engines to not crawl website by any robots. Here you an also define what to crawl and what not like below:
User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /folder-name/
This snippet tell search engines to not crawl the folders including sub folders and files under them, everything else will be crawled. You can also select an agent in this file like below:
User-agent: Google Disallow: User-agent: * Disallow: /
This snippet tells Google bot should not crawl your website. Ultimately we are working on WordPress and to make website SEO Friendly so the optimal configuration for robots.txt file is below:
User-agent: * Disallow: /wp-admin/ Disallow: /trackback/ Disallow: /xmlrpc.php Disallow: /feed/ Allow: /wp-admin/admin-ajax.php Sitemap: https://www.yourdomainname.com/sitemap_index.xml
Make sure to change yourdomainname.com with your actual domain, you can also download the file from download robot.txt and upload to your WordPress root directly you will need to have FTP / SFTP access to do this.
Make sure you are using Permalinks for SEO Friendliness you can change this Settings >> Permalinks use nice URL’s in permalink using “/%category%/%postname%/” is one of the best practice.
Secure Your Website with SSL Certificate
SSL or Secure Sockets Layer is now become an important part of any website, it is not just for authenticity but it really secure your data and also prevent from hacking attempts but it doesn’t mean that your website can’t be hacked if the SSL is ON. Google also suggest that to make your website secure with SSL Certificate. You had notice that in Google Chrome some website says not secure in address bar, and some having the green with https in the address bar.
SSL Can help you to make your website one step up in terms of Search Engine Optimization, SSL is one of the essential thing for websites now. You can use any of the commercial SSL Certificate from Godaddy or any other provider, you have to buy it from there and install it, also there is free version of SSL also present which is called Let’s Encrypt which is require some additional steps if you know how to install it get this install or hire someone to get this for you.
Web Hosting / Server
Speed is always good for your website make sure your website is load quickly or at least within the world average page load time which is about 22 seconds but some peoples claims less then 3 seconds to load a web page completely. Anyways it is important to have good page load time. With that you need to choose a good web host, there are many web hosting to choose from as we have many options there are many confusions. I suggest to have a web hosting with SSD storage (which is faster then normal HDD) and better performance with required RAM and OS, Ubuntu is getting so popular now these days.
DigitalOccen, Google Cloud, Microsoft Azure are the big names which are providing world class hosting services for your website, they also have free trial to start. So make sure you have good web hosting if not shift your website and experience the performance of Cloud Computing.
Content Delivery Network (CDN)
If you are getting lots of hits to your website CDN is good for you, CDN basically store your static assets with them and serve user when required, static resources are like images CSS and JS files. CDN’s are fast becouse they create copy of your files to multiple locations and serve from nearest location of the visitor that improve performance. There are lots of CDN are present to choose from StackPath is one of them which we are using since years.
Optimization of Cache CSS and JS Files and Images
If you have not optimized your Image, CSS and JS files the above steps are not fully performance, make sure your images are well optimized use Minified JS and CSS.
For that you can use W3 Total Cache Plugin, it is not just make cache of of your website but make your CSS and JS combine and minify. Let have a look how to setup it.
Go to Plugins and Install W3 Total Cache of Download and Upload to your Plugins Directory and Activate it, Navigate to General setting and Enable Page Cache, Minify, Opcode Cache, Database Cache, Object Cache, Browser Cache, CDN (If available) and Fragment Cache, they all can be configured separately, below is the screenshot of everything so make sure you have done correctly.
If you done it correctly you can setup individual items and make changes if required.
Optimization of Images
This is most important part, if your images are not optimize for web they may be slow down your website speed so make sure you have optimize your image sizes and dimensions, there are some plugins available that will do it for you. You can use one of them
- Smush Image Compression and Optimization
- EWWW Image Optimizer
- reSmush.it Image Optimizer
- Compress JPEG & PNG images
- ShortPixel Image Optimizer
You can use one of them which is best for you, there is also an advance method available which is called WebP images, but that is not supported by all browsers but modern browsers are compatible with that, Using WebP, webmasters and web developers can create smaller, richer images that make the web faster. I suggest to use WebP with caution. Know more about WebP read the article on Google A new image format for the Web.
Test Your Website Speed and Optimization
You need to make sure you score good in Google Page Speed Test and GTMetrix there will be some more optimization required by suggestion provided by these tools Like Serve scaled images, minification, Expires headers and other items.
Hope you enjoyed this article, if you have any question or you like to have more information on any of the above topic you can comment below.