🗂️ Flarum SEO

This Flarum extension will add SEO tags to your Flarum forum site for search engines and social media. It will make sure your site will be visible correctly by adding page identical title and description using the discussion content and title.

Total Downloads Supports latest Flarum version

If you have any feedback, let me know! Do you experience problems? You can report issues on the Flarum Forum or on GitHub.

🛠️ Latest update: December 17, 2024 - Version v2.0.4

Previous updates:

December 17, 2024 - Version v2.0.4
October 18, 2024 - Version v2.0.3
October 14, 2024 - Version v2.0
March 1, 2024 - Version v1.8.1
May 29, 2021 - Version v1.8.0
March 21, 2021 - Version v1.7.2
March 20, 2021 - Version v1.7.1
March 20, 2021 - Version 1.7.0
Feb 17, 2021 - Version 1.6.2
Feb 17, 2021 - Version 1.6.0
Dec 21, 2020 - Version 1.5.0
Oct 21, 2020 - Version 1.4
Sep 29, 2020 - Version 1.3
May 26, 2020 - Version 1.2.1
May 11, 2020 - Version 1.2.0
December 22, 2019 - Version 1.1.0
July 27, 2019 - Version 1.0.2
May 25, 2019 - Version 1.0.1
May 18, 2019 - Version 1.0.0
May 11, 2019 - Version Beta 4
February 6, 2019 - Version Beta 3
January 4, 2019 - Version Beta 2
Initial release - Version Beta 1

📥 Installation

If you like to install this extension, run the following command:

composer require v17development/flarum-seo

♻ Updating

Run the following command on your server to update the plugin

composer update v17development/flarum-seo

⚒️ Extending & using in your own extension

You can use functionalities from this extension in your own extension. For more information, check this knowledge base article.

✔️ Customizable

New in version 2.0 is the Seo Meta object, customizable for each object so you are able to manage to how you like it. Give discussions a custom description. Read more about how that works here.

👍️ Do you like this extension?

Awesome! Since 2020 we've also released another cool extension for when you are using Flarum as a support forum. It will add a knowledge base and support tickets. This Flarum extension will turn your community into a real support platform 😎

🐛 Issues & bugs

⚠️ Note for everyone reporting issues in this topic:

Your issues might get lost in this topic after more replies and we forget about it. When working on an update of our extensions, we always check the GitHub issue list, not this topic.

This preferation might be different per extension developer, but we at V17 prefer GitHub issues as our issue tracker.

🎁 Adding SEO tags to the following pages:

  • Home page
  • Tags page (if extension is enabled)
  • Discussion page
  • User profile
  • Pages page (if extension is enabled)

✅ Works with

This extension will work with the following extensions enabled or disabled. All extensions are not required, but it will work together if they are installed and enabled:

🔍 How do the results look like in Google?

Potential it could look like this, after Google reindex your site. This could take a while before Google or any other crawler does this. The following screenshots are in Dutch, but you get the concept:
How it looks like

⏱️ How long will changes take effect?

It depends. Recrawling can take a few days, up to a few weeks until most of your results are updated. Use the FriendsOfFlarum Sitemap to let Google know what discussions there are on your forum. You may speed it up by manually update a search result Google via the Google Search Console, but that is no gurantee that the search result will be updated directly.

Read more about how you can let Google recrawl your site

🧰 Using following SEO & share methods:

The extension will use the following SEO & share methods:

  • Default HTML meta tags:

    • application-name
    • description
    • keywords
    • language
  • Adds robots.txt to your forum, when Sitemap extension of FriendsOfFlarum is enabled, the link to your sitemap.xml will appear in the robots.txt

  • The Open Graph protocol (for social media, http://ogp.me):

    • og:type
    • og:title
    • og:description
    • og:url
    • article:published_time
    • article:updated_time
  • Schema.org SEO standards (most used by Search engines)

  • Sets page image to social media if set. When the first post contains an image, it will be used instead.

  • Adds a nofollow & dofollow link management system

  • Opens external links in new tab

👍 You like what I did?

You may like to buy me a coffee and support my work 🙂

    Cool, Flarum needs something like this badly.

    Sadly i can't test it at the moment until some plugins are upgraded to Beta 8 and i can update my forum.

    Good job and thanks for the hard work.

      For a few weeks I have been closely following the progress @JasperVriends made with this code. I'm very excited to see this extension finally published, especially for free! The integration with other extensions and quality of this code is amazing. I'm hoping to see this grow into one of the most valued extensions our ecosystem has to offer. Great job!

      I'm recommending this extension to anyone taking SEO seriously.

        Zeokat Yeah, I agree, but that is why I've created this extension haha
        Hopefully for you that you can upgrade to Beta 8 soon! 🙂

        luceos Thank you for your support and feedback the past few weeks! I appreciate that very much 🙂

        Shahiem Thanks! 🇳🇱

        Things I love about this extension:

        • Beautifully written code.
        • Well documented.
        • Love how you separated the namespaces 😃
        • This extension solves an issue that has daunted Flarum for quite some time.
        • This extension is completely FREE of charge, best SEO tool yet with added hooks into other extensions.

        Amazing work! 👏 👏

        Small first update

        • Moved the repository to v17development/flarum-seo as my organisation stands for open source and will be easier to maintain by future employees.
        • Thanks to @ziymed for his pull request on Github, Arabic is now added as supported language!
        • Fixed canonical URL on profile page: force username as canonical URL instead of circulate between ID and username (and confusing Google what the correct URL is 😛 )
        • Added potential searchbar to the Google results. I'm not sure if this works yet, we will see within a few days.

        Update

        Remove the old package, install the new package. The package url won't change anymore.

        composer remove jaspervriends/flarum-seo
        composer require v17development/flarum-seo

          JasperVriends Fixed canonical URL on profile page: force username as canonical URL instead of circulate between ID and username (and confusing Google what the correct URL is 😛 )

          Have you considered this issue when making this choice? When the username is numeric that wouldn't really work. For example, /u/12345 would look for an user with the ID 12345 and give 404, instead of looking for the user with the username 12345.

            matteocontrini Actually not 😂 I saw that Google crawled both my user profile pages, so the username URL and the ID URL and thought that username would be better.

            But I suggest Flarum to use something like /uid/1 for user ID's URLS instead both on the same url (/u/1). But thats not something I can change in my plugin I'm afraid

            How does the default qa thing work. Since my site isnt question and answers how does it pick which post?

            Also can you explain a little more about the increase server load? Whats going on in the background to increase the load etc?

              MikeJones If you haven't that answer plugin installed, my plugin simply won't pick a post as 'answer'. So Google just shows the posts without marking it as solved. I do not know yet if that affects the search results. Time will say 🙂

              It depends per discussion how it will effect the loadspeed of the webpage. It loads all posts at once and then makes an array and serves it as json. But there is no caching in that part yet, so it will load the posts again and again per page load. So that part is not perfect yet. I need to figure out what will be the best way to serve it.

              Notice: If you navigate through javascript to discussions, that will not happen as it is using the API. The trigger is set on the https://www.forum.com/d/ url. So it will only be a problem when people are going to that specific page from outside.

                JasperVriends It loads all posts at once and then makes an array and serves it as json. But there is no caching in that part yet, so it will load the posts again and again per page load. So that part is not perfect yet. I need to figure out what will be the best way to serve it.

                I guess my question is whats the purpuse of that operation? Is it creating and adding all the meta tags during this operation when being visited by a direct link?

                  Hey @JasperVriends great work so far. Got this installed on my forum.

                  Questions:

                  1. Is there a control panel to disable/enable certain features?
                  2. Is there anyway I can remove the "description" tag under each post? I want to do this because it's picking up raw BBcode and include that into the description.
                  3. If I don't have the QnA extension installed, and I don't plan on installing it, will the default settings slow down my site?

                  Pic reference to question 2.

                  Thanks,

                    bin it's picking up raw BBcode and include that into the description.

                    I feel like there could be a way for the extension in the future to strip the bb code?

                    bin

                    Hi there. Not want to disturb or interfere with any communication here, but I thought since you're willing to try the plugin and I spoke with him not a long time ago I can answer your questions as good as I can.

                    There is no control panel yet, this is planned for in the future. I don't know if it is possible to remove the description tag, I do however know that in the coming week an update is planned to filter markdown and BBcode. It is planned. If you'd like you could create an issue for it?

                    I'm not sure if this will slow down your site. It does exactly the same but leaves the "Answer" mark gone.

                      PascalBoschma Thank you for that. If it's already planned, I'll skip the issue ticket. Will be waiting for the update.

                      Thanks,

                        This is a very useful and revolutionary extension for Flatum, but I’m not understanding how to edit meta tags or the Open Graph. Is that even possible?

                          MikeJones The purpose is for getting the posts underneeth the search results, so it triggers the reader ro read the full post. That is for getting the following result on Google.. Personally I'm happy that it indexes my posts now like that. But not sure if everyone likes that haha That is why you can turn it off

                          bin You can still report that issue so you are sure I fix that 😀

                          user1993 Thanks 😁 It is not possible to edit the OG and meta tags as they are linked to the discussion description and title. The page image fill be the favicon/logo by default. But that will be something that should be editable in the future 🙂

                          The default description of your site can be changed in the 'Basic' settings at the Admin panel.

                            JasperVriends The purpose is for getting the posts underneeth the search results, so it triggers the reader ro read the full post. That is for getting the following result on Google.. Personally I'm happy that it indexes my posts now like that. But not sure if everyone likes that haha That is why you can turn it off

                            Awesome can't wait for a way to turn this off from the UI