Back to blog

SEO tips I apply to all my projects

Posted

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

  1. Add a robots.txt file to your site. You can see more info about it in this article by Google.
  2. 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
  3. Try to generate descriptive URLs, for example using slugs in blogs.
  4. Dynamically change the title and page description for each page of your site.
  5. Add open graph and social media meta tags. You can even use services like Imageee to generate dynamic images for your sites.
  6. 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

  1. Minify your JS
  2. 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.
  3. 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

  1. 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.
  2. 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.
  3. 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
  4. 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.

Happy coding!

Included in categories

coding tooling

Did you enjoy this article? Consider sharing it on social media and following me on Twitter 🤙