SEO tips I apply to all my projects
I'm writing this article to list all the things related to SEO that I consider a minimum to keep your website highly ranked by search engines (Google, Bing, DuckDuckGo etc)
Disclaimer: I don't consider myself an expert in SEO so I'm pretty sure I'd miss some things. Feel free to contact me with any other tips or comments and I'll add them to the list 😉
SEO development tips
- Add a robots.txt file to your site. You can see more info about it in this article by Google.
- Create a sitemap.xml of your site. The sitemap file contains all pages of your site and a priority so Search engines know which pages or your site are more important. You can use online tools like sitemaps.com. For dynamic pages (like blogs) try to keep it updated or use a package to re-generate it
- Try to generate descriptive URLs, for example using slugs in blogs.
- Dynamically change the title and page description for each page of your site.
- Add open graph and social media meta tags. You can even use services like Imageee to generate dynamic images for your sites.
- When using external libraries, always check multiple alternatives and use the ones with the smallest bundle size. For JS, you can check the details of a library and alternatives in bundlephobia
SEO performance tips
- Minify your JS
- Optimize your CSS using PurgeCSS. This is pretty useful when working with libraries like Bootstrap or TailwindCSS as most of the times we end up using a very small percentage of the whole library. PurgeCSS can remove all unused classes from your bundle, making your final CSS way smaller.
- Optimize your images using Squoosh. On average, I'm saving around 80% of size by passing my images through it and the quality loss is minimum.
Other tools and audits
- Use CloudFlare DNS so your site is cached and served from their CDN. I've seen a huge performance improvement by just doing this. You'll just need to open a free account in CloudFlare, add your site to the free plan and change your DNS in your domain registrar (Namecheap, Godaddy, Ionos, Porkbun...) to the ones provided by CloudFlare.
- Run LightHouse audit using Chrome and keep scores as high as you can. I know this sounds pretty generic but the generated report gives you tips on how to fix the most common issues. Just remember to run the audit and fix as many things as you can.
- Add your site to Google Search Console and add your sitemap so Google knows which pages to index and how to prioritize them. Also, check this Youtube playlist by Google
- Use an Analytics tool, like Google Analytics or, if you prefer something with better privacy, check Simple Analytics.
Hope you find this useful. If so, consider sharing it with your peers 😄
I'll try to keep this article updated as much as possible with more tips.
If you enjoyed this article consider sharing it on social media or buying me a coffee ✌️
Oh! and don't forget to follow me on Twitter where I share tons of dev tips 🤙
Other articles that might help you
Two simple tips to improve Vue.js performance and SEO
Apart from writing articles in this blog, I spent most of my time working on my personal projects.
Quicktalks is a place where indie hackers, makers, creators and entrepreneurs share their knowledge, ideas, lessons learned, failures and tactics they use to build successfull online products and businesses. It'll contain recorded short interviews with indie makers.Message me to be part of it