danpros / htmly

Simple and fast databaseless PHP blogging platform, and Flat-File CMS
https://www.htmly.com
GNU General Public License v2.0
1.1k stars 267 forks source link

[FEATURE REQUEST] Add Meta Robots Tag Support in Content Editor (Default: noindex, nofollow) #801

Open vishalchopra666 opened 2 months ago

vishalchopra666 commented 2 months ago

Description: It would be highly beneficial to have the ability to add a meta robots tag in the content editor for blog posts, static pages, and other content types. This feature would allow users to control search engine indexing on a per-page or per-post basis, with the default setting being noindex, nofollow. This is particularly important for avoiding thin content issues, such as tags, categories, and pagination pages, which could negatively impact SEO if indexed.

Why is this important?

  1. SEO Control: Users can define the indexing behavior for each post or page individually, with the default setting being noindex, nofollow to prevent unwanted content from being indexed by search engines.
  2. Avoid Indexing Thin Content: Pages like tags, categories, and pagination often result in thin content that adds little value to search engine results. Preventing these pages from being indexed by default protects the site's SEO health.
  3. Better Compliance with Search Engines: Unlike robots.txt, which can be ignored by search engines, the meta robots tag embedded in HTML has a stronger influence on crawling behavior, making it more effective for controlling indexing.

Suggested Implementation:

  1. Add a field in the content editor to insert or modify the meta robots tag, with the default setting being noindex, nofollow.
  2. Provide global meta robots tag settings that can be applied to all pages, posts, tags, categories, and pagination by default, with the ability for users to override these settings on a per-page or per-post basis.
  3. Ensure that the noindex, nofollow tag is automatically applied to tags, categories, and pagination pages unless manually overridden.

Examples:

Expected Benefits:

Potential Challenges:

Conclusion: Adding meta robots tag support with a default setting of noindex, nofollow would greatly enhance the flexibility and SEO control that users have over their content, especially in avoiding thin content issues like pagination and tag/category pages. This feature will make the platform even more powerful for bloggers and website owners, ensuring better search engine optimization and content privacy.

Thank you for considering this feature request!

kuslahne commented 1 month ago

It will be great also if we can modify meta tag for canonical URL, as this will decrease chance of duplicate content found by search engine. Maybe change to url friendly something like blabla?pages=5 to blabla/pages/5 a bit easier than add this metatag for editing.