NeuroAgent

How to Hide Outgoing Links on WordPress Site

Step-by-step guide to hiding external links on WordPress. Best plugins for automatically converting links to internal ones and SEO optimization of coupon sites.

Question

How to hide outgoing links on a website? On the promo code website https://randewoo-promokod.ru/, some promo codes have “Link to offers” links that look like internal ones. Is there a plugin that can automatically convert all external links to internal ones?

NeuroAgent

Effective Methods for Hiding External Links on WordPress Sites

For hiding outgoing links on a WordPress site, there are several effective plugins that automatically convert external links to internal ones. The most popular solutions are WP-NoExternalLinks, Mihdan: No External Links, and ELT (External Links Tune’r), which create a redirect proxy and make external links indistinguishable from internal ones.

Table of Contents

Hiding external links solves several important tasks for your coupon site:

  1. SEO optimization - search engines may lower a site’s ranking when there are too many outgoing links
  2. Traffic retention - links appear to be internal, which increases user trust
  3. Protection against penalties - prevents the “power” of the site from leaking to external resources
  4. Improved user experience - links appear more authoritative and secure

As noted by WordPress Mania, after activating the plugin, a special button for managing links appears in the WordPress post editor.

WP-NoExternalLinks

This plugin converts all external links in posts to internal ones via redirect. Main features:

  • Automatic conversion of external links
  • Exception list for specific domains
  • Two link masking structures
  • Ability to disable link closure for individual posts

The plugin creates links in the format http://yoursite.com/go/http://externalsite.com, making them indistinguishable from internal links.

Mihdan: No External Links

An excellent solution for mass hiding and encrypting links, according to YrokiWP. Features:

  • Works very fast
  • Supports URL encryption
  • Flexible settings
  • Automatic processing of all content types

ELT (External Links Tune’r)

A powerful plugin for managing the behavior of external links, as described on InwebPress. Functions:

  • Configure external link behavior
  • Change link appearance
  • Automatically add attributes
  • Flexible configuration for different content types

Other plugins

  • JExR - allows flexible configuration of converting external links to internal ones
  • WooCommerce Cloak Affiliate Links - specifically for commercial sites on WooCommerce
  • WP no external links - rewrites links without removing the <a> tag

Step-by-step instructions for setting up the most popular plugin:

  1. In the WordPress admin panel, go to “Plugins” → “Add New”
  2. In the search, enter “WP-NoExternalLinks”
  3. Install and activate the plugin
  4. Go to “Settings” → “WP-NoExternalLinks”

Main settings:

  • Enable plugin - activate/deactivate functionality
  • Excluded domains - list of domains that don’t need to be converted
  • Redirect URL - configure the path for internal links (e.g., /go/)
  • Link attributes - adding rel=“nofollow”, rel=“noreferrer”, etc.

For your coupon site, it’s recommended to add partner program domains to the exceptions to avoid losing commissions.

Alternative methods for hiding links

Manual attribute addition

If you don’t want to use plugins, you can add attributes manually:

html
<a href="https://partner-site.com" rel="nofollow noreferrer" target="_blank">Link to offers</a>

This is a simple method, but requires manual work for each link.

Using .htaccess

For technically savvy users, you can set up redirects through the .htaccess file:

RewriteEngine On
RewriteRule ^go/(.*)$ https://$1 [R=301,L]

Functions in functions.php

Add to the functions.php file of your theme:

php
add_filter('the_content', 'convert_external_links');
function convert_external_links($content) {
    $content = preg_replace_callback('/<a[^>]+href="([^"]+)"/i', 
        function($matches) {
            if (strpos($matches[1], site_url()) === false) {
                return '<a href="'.home_url('/go/'.$matches[1]).'"';
            }
            return $matches[0];
        }, 
        $content
    );
    return $content;
}

Pros and cons of link conversion

Advantages

  • SEO bonus - search engines better perceive sites with fewer outgoing links
  • Increased trust - links appear as internal, which increases user trust
  • Control - you can track all outgoing transitions through site statistics
  • Security - protection against phishing and malicious sites

Disadvantages

  • Complicated analytics - accurate information about referrers is lost
  • Possible issues with affiliate programs - some networks may prohibit link masking
  • Additional load - redirects create a small load on the server
  • Risk of blocking - some affiliate programs may block sites with masked links

Recommendations for your coupon site

For a coupon site, I recommend the following approach:

  1. Use WP-NoExternalLinks as the main tool
  2. Add to exceptions domains of main affiliate programs (AliExpress, Ozon, etc.)
  3. Set up redirect via the /go/ page for all other external links
  4. Enable nofollow and noreferrer attributes for additional security
  5. Regularly check the functionality of links and correctness of redirects

Important: Some affiliate programs (for example, Admitad) may prohibit link masking, so be sure to check the terms of cooperation before implementation.

Sources

  1. How to make external links internal | WP-NoExternalLinks
  2. Close external links WordPress | WordPress Mania
  3. How to mass hide links on CMS WordPress. No External Links.
  4. ELT - managing internal and external links on the site | InwebPress
  5. Wordpress: Making external links internal
  6. SEO: converting external links to internal | Brullworfel
  7. Making all external links internal with a redirect page in WordPress

Conclusion

Hiding external links on a WordPress site is an effective way to improve SEO and user experience. For your coupon site, I recommend using the WP-NoExternalLinks plugin, which automatically converts all external links to internal ones via redirect. This will make “Link to offers” links indistinguishable from internal ones, increasing user trust and improving the site’s SEO metrics.

It’s important to remember the need to check the terms of affiliate programs before implementing link masking, as some networks may prohibit this practice. Regularly monitor the plugin’s operation and configure exceptions for important partner domains.