Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: gevv on February 26, 2022, 07:48:19 AM

Title: SMF 2.1 Nofollow external links (only external domains)
Post by: gevv on February 26, 2022, 07:48:19 AM
Hi,

Simple method to Topics and signature add nofollow to other site links. 

1: Install Smarter Internal Links (https://custom.simplemachines.org/index.php?mod=4308) mod. Thanks @Sesquipedalian

2: Edit Sources/Subs.php

Change all rel="noopener"  to rel="nofollow ugc noopener"

Line: 1955, 1993, 2011, 2409, 2427, 2450


What is ugc? : https://developers.google.com/search/docs/advanced/guidelines/qualify-outbound-links?hl=en

You cannot view this attachment.



Not: To add nofollow to profile website link Themes / default /  edit Display.template.php  line: 606 rel="noopener"  to rel="nofollow ugc noopener"

 edit Profile.template.php  line: 234 rel="noopener"  to rel="nofollow ugc noopener"
Title: Re: SMF 2.1 Nofollow external links (only external domains)
Post by: Wellwisher on February 26, 2022, 05:37:39 PM
@gevv Awesome work mate, very nice tip. Great for SEO on 2.1, defo recommend OP's suggestion. @Sesquipedalian my guy, any chance if it's ok with @gevv this can be incorporated with your Smarter Internal Links mod?  :laugh:

I didn't even know about ugc link tags. Thanks @gevv & @Sesquipedalian
Title: Re: SMF 2.1 Nofollow external links (only external domains)
Post by: mike623 on February 21, 2023, 08:42:15 PM
Thank you, it worked. Don't know about SEO as the links are user generated content, but for sure spammers won't be that likely to post now.