Remove XenForo Goto 301 Redirect Links

KodyWallice

New Member
Joined
May 7, 2021
Messages
10
Reaction score
0
Points
1
Like other users, I have noticed many 301 redirects on my XenForo forum. They're on the main forum list, on the thread lists, and on the thread pages themselves. While some of these links (most of them) are nofollow links, some are not. I can understand why the redirects exists, but I honestly don't think many people click them. I don't mind having them on my website, but I don't want the search engines to see the links. They can't be good for pagerank flow. All I want is to have a homepage, forum pages, and thread pages. I can do without all of the other random links that exist on all of these pages. It's difficult to imaging that they're not causing ranking issues.

Today I'm focusing on the /goto/ URLs that are created when a member quotes and replies to another member on a thread page. Here's an example of a quote from this forum itself:

xenforo-quote-reply-goto-url-link.gif

If you take a look at the above screen capture, you'll see the LukeLewis said link. That links goes to:

https://gaulard.com/forum/goto/post?id=74

It's redirected to this URL:

https://gaulard.com/forum/threads/38/#post-74

At first glance, you may be thinking, "That's not bad. It's just a redirect." I thought that too. But now think about a thread that's 200 pages long with 20 posts per page. That's 4000 messages in only one thread. If every one of those messages contained a 301 redirect, things could quickly and easily spiral out of control. And that's just one thread! What if you ran a forum that has 500,000 threads? Hopefully, you get my point. I don't think Google wants to spend it's time following URLs that link back to other posts in the same thread. And honestly, I don't really think humans use these links either. So instead of them being nofollowed pagerank drains, crawl budget wasters, and not really utilized, I'd rather remove the link portion of the text for visitors who aren't logged in. If someone is logged in, then fine, the links will work great. But for those who aren't logged in, I'd like to make this link regular plain text.

So my question is, does anyone know which template I need to update to remove the links? Also, does anyone know the code I need to change to make these links invisible to search engines and guests who aren't logged in as members?
 

KristinaW

New Member
Joined
May 7, 2021
Messages
10
Reaction score
1
Points
3
To remove the /goto/ links, you'll need to edit the bb_code_tag_quote template. Find the following code:

Code:
<a href="{{ link('goto/' . {$source.type}, null, {'id': $source.id}) }}"
class="bbCodeBlock-sourceJump"
rel="nofollow"
data-xf-click="attribution"
data-content-selector="#{$source.type}-{$source.id}">{{ phrase('x_said:', {'name': $name}) }}</a>

Change the above code to this:

Code:
<xf:if is="$xf.visitor.user_id">

<a href="{{ link('goto/' . {$source.type}, null, {'id': $source.id}) }}"
class="bbCodeBlock-sourceJump"
rel="nofollow"
data-xf-click="attribution"
data-content-selector="#{$source.type}-{$source.id}">{{ phrase('x_said:', {'name': $name}) }}</a>

<xf:else />

{{ phrase('x_said:', {'name': $name}) }}

</xf:if>

As of this writing, the code you need to update is on line 9.
 
Remove XenForo Goto 301 Redirect Links was posted on 06-14-2021 by KodyWallice in the XenForo forum.

Similar threads

Search

Forum statistics

Threads
81
Messages
144
Members
16
Latest member
wick3dr0se
Looking for an all-around awesome forum? Check out IndyFor!
Top