Removing nofollow from existing links

AI-generated summary

The discussion addresses an issue where existing links still show as nofollow after adding a new domain to the exclude list in Discourse 2.3.5-dirty. bvdrie72 noticed that new links worked correctly, but old ones did not. Johani explained that the change doesn’t apply to already baked posts and recommended rebaking old posts using the command rake posts:rebake_match["NEW_DOMAIN.COM"]. The solution worked, and bvdrie72 confirmed the rebake was successful and plans to update the installation.

I am running 2.3.5-dirty. I recently added a new domain to my exclude from nofollow links.

any NEW link that is created with that domain works as expected however any EXISTING link still shows as nofollow.

What am I missing?

The change is not reflected in old posts because they have already been baked. What you need to do is rebake old posts in order for the change to take take effect.

You’ll need to SSH into your server and run the following commands

cd /var/discourse
./launcher enter app
rake posts:rebake_match["NEW_DOMAIN.COM"]

Swap NEW_DOMAIN.COM with the domain you added to the setting. For example

rake posts:rebake_match["seaeagle.com"]

This indicates that you didn’t follow the official installation guide when you set your site up. I would recommend that you do that if you want to avoid headaches down the line.

The rebake worked great. I will be sure to update the install soon.