Boosting your SEO with Odoo:
a practical guide to using the robots.txt file
Did you know that the robots.txt file can make a big difference in how your site is perceived by search engines?
With Odoo, this file becomes a powerful tool for improving the indexing and ranking of your pages. In this article, we explain how to use the robots.txt file effectively, with concrete examples of good and bad practices.
What is the robots.txt file?
The robots.txt file is a small text file located at the root of your site. It is used to give instructions to search engine bots, like Googlebot, about which pages they can or cannot crawl. For example:
- Googlebot : used by Google to index pages.
- Bingbot : used by Bing to crawl your site.
A well-configured robots.txt file can optimize your site's indexing while preventing issues like duplicate content.
Here’s what the contents of a standard robots.txt file looks like:
User-agent: *
Disllow: /admin/Disallow: /cgi-bin/
Allow: /public/
- User-agent : Specifies the targeted bots (use * for all bots).
- Disallow : Blocks access to certain parts of the site. Add pages you want to restrict bots from accessing.
- Allow : Grants access to specific subsections. Add areas where you want bots to crawl, even if they wouldn’t be accessible by default.
Practical tips to optimize the robots.txt file in Odoo
1. Allow access to important pages
Essential pages, like blog posts or product pages, must be accessible to bots to maximize their indexing. For example, a product page detailing a flagship item in your catalog or a contact page with critical information for your clients must be indexed to ensure visibility.
Good practice (example):
User-agent: *
Allow: /blog/Allow: /products/
Bad practice:
Ici, vous interdisez l’accès à tout le site, ce qui rend votre contenu invisible pour les moteurs de recherche.
2. Block irrelevant pages
Certain pages, such as admin or session settings, should not be indexed as they provide no SEO value. Other examples include:
- Category pages with no unique content: Often automatically generated to organize products or posts but lacking unique information.
- Sorting and filter pages: Like /products/sort/price-asc or /search/?filter=blue, which duplicate main content.
- Confirmation or transaction pages: Like /checkout/success, which are irrelevant to search engines.
Good practice (example):
User-agent: * Disallow: /admin/ Disallow: /search/ Disallow: /?sessionid=
Bad practice:
User-agent: *
Allow: /admin/
Exposed administration pages can not only harm your SEO but also create security vulnerabilities.
3. Manage duplicate content
Duplicate content can confuse search engines and harm your rankings. Use robots.txt to prevent this by targeting specific types of commonly duplicated pages, such as:
- Category pages: If categories generate different URLs for the same content, block them with a Disallow directive.
-
URL parameters: Pages with parameters like ?ref=source may appear as duplicates. Example:
User-agent: * Disallow: /*?ref=
-
Search filters: If your site generates unique pages for every filter combination, consider blocking their indexing:
User-agent: * Disallow: /search/
- Sorting or pagination pages: Pages like /products/page/2 don’t need to be indexed, as they fragment the visibility of primary content.
Taking these measures ensures search engines don’t waste their crawl budget on less relevant pages.
Good practice (example):
User-agent: * Disallow: /category/page/
Bad practice:
Ignoring the issue and allowing duplicate content to be indexed.
How to customize the robots.txt file in Odoo?
Odoo automatically generates a robots.txt file, accessible at the following address:
https://yourbase.odoo.com/robots.txt
Steps to modify your file:
- Access your Odoo interface: Log in to your dashboard.
- Go to Website > Configuration > Settings.
- Click “Edit robots.txt file”: Add or modify directives as needed.
Additional SEO tips for Odoo
Beyond optimizing the robots.txt file, which is an essential basic practice, here are other ways to improve the SEO of your Odoo-created site. Some tips are also applicable outside of Odoo.
1. Configure friendly URLs
Descriptive URLs containing keywords improve SEO.
Examples:
- Friendly URL: https://votresite.com/blog/comment-optimiser-seo
- Bad URL : https://votresite.com/page?id=123
Configuration:
- Go to Settings > Enable friendly URLs.
- Modify page templates.
Enabling the "Friendly URLs" setting in Odoo will not automatically optimize all your site's URLs. This setting simplifies the use of more understandable and readable paths for users and search engines, but manual adjustments are often required.
After enabling, ensure to:
- Check generated URLs for each page and adjust if they still contain unnecessary characters or parameters.
- Include relevant, clear keywords in URLs for key pages like products or blog posts.
- Supprimer les mots de liaison Remove unnecessary filler words (e.g., "and," "or") unless needed for clarity. (par exemple, "et", "ou") sauf si nécessaires pour la clarté.
It's a starting point, but personalization is key for a complete optimization.
2. Use meta tags effectively
Meta tags, such as titles and descriptions, must be unique and include relevant keywords.
Configuration:
- Navigate to Website > Pages.
- Edit meta tags for each page to maximize their SEO impact. Best practices include:
- Unique and relevant titles: Example: "Improve your ERP with Odoo" instead of "Product page."
- Engaging descriptions: Between 150–160 characters. Example: "Discover how our ERP software can transform your business management with intuitive features."
- Avoid keyword stuffing: Overloading meta tags with keywords can be penalized.
3. Optimize images
Images should be compressed and have descriptive alt tags.
Examples:
- Optimized filename: erp-product-odoo.jpg
- Bad filename: IMG12345.JPG
Configuration:
In Odoo’s image editor:
- Compress images before uploading using tools like TinyPNG or ImageOptim.
- Add descriptive alt tags (e.g., "ergonomic office chair").
- Rename files before uploading with clear, relevant names like office-chair-ergonomic.jpg.
4. Implement structured data
Structured data, such as JSON-LD or Schema.org, organizes and tags page information in a standardized format. It helps search engines better understand site content and provide enriched search results (e.g., reviews or business hours).
Add a schema for blog posts or products via Odoo or third-party modules.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BlogPosting", "headline": "Comment optimiser votre SEO avec Odoo", "author": { "@type": "Person", "name": "Votre Nom" }, "datePublished": "2025-01-03", "image": "https://votresite.com/images/blog-seo.jpg", "articleBody": "Voici comment optimiser votre fichier robots.txt et vos pratiques SEO dans Odoo..." } </script>
For products, choose a schema integration module that automates the creation and addition of necessary tags to product pages.
If you have an online store, you could use structured data to provide search engines with specific information about your products (name, price, availability, customer reviews, etc.). This helps your products appear directly in carousels or detailed search results.
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "Chaise ergonomique",
"image": "https://votresite.com/images/chaise.jpg",
"description": "Une chaise ergonomique idéale pour le travail à domicile.",
"brand": "ErgoChairs",
"price": "199.99",
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock"
}
Not using structured markup at all or providing incomplete/incorrect information could prevent search engines from fully leveraging your site's content and reduce your visibility in rich results.
5. Improve loading speed
A fast site enhances user experience and SEO.
Useful tools:
- Google PageSpeed Insights: Analyze performance. A site loading in under 2 seconds with scores above 90 on mobile and desktop is considered optimal.
Actions:
- Compress images.
- Minify CSS and JavaScript.
- Enable caching.
Conclusion
The robots.txt file is a secret weapon for guiding search engines and avoiding indexing errors. Combined with Odoo’s powerful SEO features, it can transform your site into a well-oiled machine to attract and convert visitors.
Adopt these best practices and see how they can make a difference in your digital strategy. Remember, SEO is an ongoing process: stay updated and adjust settings based on trends and audience needs.
Ready to boost your site to the top of search results? With Arche TI and a well-planned strategy, success is within reach!