Now a days, for a web developer it is a best practice to make the site SEO friendly before lanching. Being a developer I generally keeps in mind the following key points:
- Use compressed media content:
Media content like Images, Videos must be as compressed as much its possible and also keep in mind that your images may be a playing a big role in your web layout. So don’t compress too much that its quality gets degraded. If possible use SVG image format , it will reduce your image size by 90%. This solution is best for vector image content based website designs.Media content effects in loading the view, if possible use “lazyload” like plugins to put a delay on the media content which is not visible in the current screen yet. LazyLoad loads media on scroll of screen as the media required to display.You can compress your images (jpg / png ) from www.compresspng.com and www.compressjpg.com
Or you can also use TinyPNG for compressing jpg and png type of images. This web has currently limit of 20 images compression at a time. - Meta tags
Use meta tags like description, keywords, og:image, og:title etc. for making presence of the web page better to other platforms or search engines. - Put alt attribute in all images
Don’t forget to put value in alt attribute of image tag. It helps search engine in tracing the image for the content related to type of image. It also results in increasing traffic to your website for that relevant content. - Enable compression on your server
Enable content compression like “gzip” for your web content. It automatically compress the data you required for a single url hit. If you are using cPanel for your hosting, to enable this compression Go to Software > Optimize Website > Compress Content > Select Compress All content, and then click Update settings. - Set Header Cache expiration for your media content
You can set expiration time to media content of your website. Here is the code you just need to put in .htaccess file at the root of your website.123456789101112131415## EXPIRES HEADER CACHING ##<IfModule mod_expires.c>ExpiresActive OnExpiresByType image/jpg A2592000ExpiresByType image/jpeg A2592000ExpiresByType image/gif A2592000ExpiresByType image/png A2592000ExpiresByType text/css A2592000ExpiresByType application/pdf A2592000ExpiresByType application/javascript A2592000ExpiresByType application/x-shockwave-flash A2592000ExpiresByType image/x-icon A2592000ExpiresDefault A2592000</IfModule>## EXPIRES HEADER CACHING ## - Resolve canonical issue
Redirect your domain to either www version or non-www version via .htacess. This resolves canonical issues of your website. Here is the code for you to use following code in .htaccess file of your site’s root directory :1234#Force www:RewriteEngine onRewriteCond %{HTTP_HOST} ^example.com [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]If you are using AWS then this article may be helpful for you1234#Force non-www:RewriteEngine onRewriteCond %{HTTP_HOST} ^www\.example\.com [NC]RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] - Put render blocking js in footer of the page
The scripts which are taking time to execute , just put them in footer or very near to footer section of the web page. Always try to use minified CDN files for your 3rd party libraries / dependencies like bootstrap, sweetalert, form validation etc. - Use H1 and H2 tags
Also don’t forget to use H1 and H2 tags in your page as these tags provides a quick info about the content of the page to search engine boats. - Stop LibWWW-perl access
For security reasons to prevent DDOS attacks to your website, just append the following code .htaccess file that exists in root directory of your website.12RewriteCond %{HTTPUSERAGENT} libwww-perl.*RewriteRule .* – [F,L] - Generate schema for your website
This will help you to providing the information about your website content to search engine. This will tell search engine boats that this website has content of type business / person / product / events / organization etc. Also you need to put some details about your platform in the schema. You can create / generate SCHEMA online. JSON Schema Generator helps you to generating SCHEMA json script for you. You need to just put the generated code in header of your website’s home page. - SITEMAP
The most important role for a website to appear properly in search result makes you through Search engine bots is possible via sitemap. You can generate it by parsing your domain name to Online SiteMap Generator like websites.
You can put the generated sitemap to your root directory of your website.