Tag - Links

How to Find and Fix Broken Links in WordPress (Step by Step)


Everyone agrees that broken links are bad for user experience. But did you know that broken links can significantly hurt your WordPress SEO rankings?

Yes, it’s proven that having broken internal links on your website negatively impacts SEO rankings.

In this article, we will show you how to easily find and fix broken links in WordPress, so you can improve your user experience and SEO rankings.

Finding and fixing broken links in WordPress

What is a Broken Link?

A broken link, also known as dead link, is a link that no longer works. Broken links can happen for many reasons, but the most common reason is when a page is either deleted or moved to a different location which causes the server to show a 404 not found error.

On WordPress sites, broken links typically occur when moving a site to new domain name, or when deleting a post or page without proper redirection.

Sometimes broken links can also happen due to a typo, and they can go unnoticed for months if not years.

This is why it’s extremely important to regularly monitor broken links on your site and fix them, so you can keep them from hurting your SEO rankings.

In this guide, we will share top four methods to find broken links in WordPress. After that, we will show you an easy way to fix those broken links.

Here’s a table of content for easy navigation:

Ready? Let’s get started.

SEMRush is one of the best SEO tool on the market. It allows you to easily monitor your website’s SEO rankings and overall health.

It also includes a powerful site audit tool that crawls your website to find common errors and prepare a detailed report for you.

First, you’ll need to sign up for a SEMRush account.

It is a paid service, but they do offer a limited free account which allows you to crawl up to 100 pages on one domain name. Paid plan limits start from 100,000 pages a month.

Once you are logged in, you need to click on the ‘Site Audit’ link from the left menu.

This will bring you to the Site Audit page. From here, click on the ‘New Site Audit’ button at the top to add your website.

Adding a new site audit in SEMRush

You will be asked to enter your domain name. After that, you will be asked to configure site audit settings. You can select the number of pages to crawl and choose a crawl source.

Site Audit settings

Click on the start crawling button to continue.

SEMRush will now begin crawling your website for the site audit. This may take a few minutes depending on how many pages you selected for the crawl.

Once finished, you can click on your domain Under the Site Audit section to view your report.

SEMRush broken links

To see the broken links on your site, you will need to click on the ‘Broken’ link under the report overview.

Broken links report in SEMRush

You can now click on the Export button at the top right corner of the screen to download your crawl report. You will need it when fixing broken links on your website (more on this later in the article).

Ahrefs is an excellent all-in-one SEO tool for marketers, businesses, and SEO professionals. It offers detailed SEO insights into your own website or any of your competitors.

You can use it for keyword research, competition analysis, organic and paid keyword ideas, and site health monitoring including broken links.

First, you’ll need to sign up for an Ahrefs account. It is a paid service with plans starting from $99 per month. They also offer a full featured 7 day trial for $7.

Once you are logged into your Ahref’s dashboard, you need to enter your domain name under the Site Explorer tool.

Ahrefs site explorer tool

Site explorer tool will now crawl your website to prepare reports. This may take some time depending on how much content you have on your website.

Once finished, you’ll see an overview of your site explorer results. From here, you need to click on the Pages » Best by Links menu and then sort your report by 404 status.

Broken links

You can now export your report in CSV format to fix the broken links on your WordPress site.

Google Search Console is a free tool offered by Google to help webmasters manage their site’s visibility in search results. It also notifies you about errors including 404 errors which are caused by a broken link.

For more details, see our ultimate Google Search Console guide with step by step set up instructions.

After you have logged in to your Google Search Console account, click on the ‘Coverage’ link from the left menu.

Google Search index coverage report

You’ll find 404 errors either under Errors or Excluded tabs. Clicking on them will show you a list of errors or issues Google encountered while visiting your website.

Excluded broken links

Clicking on the 404 error will show you all the links on your website that are broken links and return a 404 error.

You can now click on the download button to get the list of all 404 errors on your website. You’ll need this to fix broken links on your website.

For this method, we’ll be using the Broken Link Checker plugin. However, this method is not recommended because it is resource-intensive and will slow down your website. Managed WordPress hosting companies like WP Engine already block users from installing this plugin on their servers.

The plugin checks for broken links on your website including both internal and external links that are resulting in a 404 error.

First, you’ll need to install and activate the Broken Link Checker plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will start working in the background to find links in your posts, pages, and comments. You can now go to Tools » Broken Links page to view the full report.

Broken Links Report in WordPress

If you have been running your WordPress blog for a long time, then this report will include broken links to third-party websites as well.

You will have to manually sort the list to find broken links on your website.

You will need to keep Broken Link Checker active on your website until you fix broken links. After that, you can deactivate the plugin because it will keep checking for broken links which will slow down your server.

We have shown you four different methods to find broken links in WordPress. Now let’s talk about how to easily fix broken links in WordPress.

The best way to fix a broken link is to redirect it to another page. For example, if you moved the contents of an article to a different address, then you will need to redirect it to the newer article.

Similarly, if an article does not exist anymore, then you would want to point users to a similar page that is closely related to the contents of the old article.

You can do this by setting up 301 redirects.

First, you will need to install and activate the Redirection plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Redirection page to set up redirects. You need to add the old broken link in the ‘Source URL’ field and the new URL in the ‘Target URL’ field.

Set up redirects for broken links

After that, click on the ‘Add redirect’ button to save your changes.

You can now test this by visiting the old broken link, and you’ll be redirected to the new page.

Repeat the process for all broken links on your website.

For more information, see our guide on how to set up redirects in WordPress for beginners.

We hope this article helped you learn how to easily find and fix broken links in WordPress. You may also want to see our actionable tips on how to optimize your images for web, and our pick of the best WordPress membership plugins to create a membership site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Source link

How to “Easily” Add Anchor Links in WordPress (Step by Step)


We occasionally use anchor links in our longer WordPress posts to help users quickly jump to the section they want to read.

Anchor links are often used in the table of content sections because they help users move up and down a lengthier article without reloading the page. It can also help with SEO as Google may show them below your search listings for easy navigation (more on this later).

In this step by step guide, we will explain what are anchor links and show you how to easily add anchor links in WordPress.

Adding anchor links in WordPress

Ready? Let’s start with a live example of anchor links.

Below is a list of all the topics we will cover in this guide. Go ahead and click on any of these links, and you’ll be taken to that specific section.

An anchor link is a type of link on the page that brings you to a specific place on that same page. It allows users to jump to the section they’re most interested in.

Take a look at the animated screenshot below:

Anchor link preview

As you can see, clicking on the anchor link takes the user to the specific section on the same page.

Anchor links are commonly used in lengthier articles as the table of content which allows users to quickly jump to the sections they want to read.

Why and when you should use anchor links?

An average user spends less than a few seconds before deciding if they want to stay or leave your website. You have just those few seconds to convince users to stay.

The best way to do that is to help them quickly see the information they’re looking for.

Anchor links make this easier by allowing users to skip the rest of the content and jump directly to the part that interests them. This improves user experience and helps you win new customers / readers.

Anchor links are also great for WordPress SEO. Google can display an anchor link in the search results as a “jump to link”.

Jump to link in search results

Sometimes Google can also display several links from that page as jump to links, and this is proven to increase the click-through rate in search results. In other words, you get more traffic to your website.

Multiple jump to links below a search result

Having said that, let’s take a look at how to easily add anchor links in WordPress.

If you just want to add a few anchor links in your article, then you can easily do so manually.

Basically you need to add two things for an anchor text to work as intended.

  1. Create an anchor link with a # sign before the anchor text.
  2. Add the id attribute to the text where you want the user to be taken.

Let’s start with the anchor link part.

Step 1. Creating an anchor link

First you need to select the text that you want to link and then click on the insert link button in the WordPress Gutenberg editor.

Add a link in WordPress

This will bring up the insert link popup where you usually add the URL or look for a post or page to link.

However, for an anchor link, you’ll simply use # as prefix and enter the keywords for the section you want the user to jump to.

Creating anchor link

After that click on the enter button to create the link.

Some helpful tips on choosing what text to use as your anchor # link:

  • Use the keywords related to the section you are linking to.
  • Don’t make your anchor link unnecessarily long or complex.
  • Use hyphens to separate words and make them more readable.
  • You can use capitalization in anchor text to make it more readable. For example: #Best-Coffee-Shops-Manhattan.

Once you add the link, you will be able to see the link you have created in the editor. However, clicking on the link doesn’t do anything.

That’s because the browsers cannot find the anchor link as an ID.

Let’s fix that by pointing browsers to the area, section, or text that you want to show when users click on the anchor link.

Step 2. Add the ID attribute to the linked section

In the content editor, scroll down to the section that you want the user to navigate to when they click on the anchor link. Usually, it is a heading for a new section.

Next, click to select the block and then in the block settings click on the Advanced tab to expand it. You can simply click on the ‘Advanced’ tab under the heading block settings.

HTML Anchor

After that, you need to add the same text that you added as the anchor link under the ‘HTML Anchor’ field. Make sure that you add the text without the # prefix.

You can now save your post and see your anchor link in action by clicking on the preview tab.

What if the section you want to show is not a heading but just a regular paragraph or any other block?

In that case, you need to click on the three-dot menu on the block settings and select ‘Edit as HTML’.

Edit as HTML

This will allow you to edit the HTML code for that particular block. You need to select find the HTML tag for the element you want to point to. For example, <p> if it is a pagraph, or <table> if it is a table block, and so on.

Now, you need to add your anchor as the ID attribute to that tag, like the following code:


<p id="best-coffee-shops-manhattan">

You will now see a notice that this block contains unexpected or invalid content. You need to click on the convert to HTML to preserve the changes you made.

Convert to HTML

How to Manually Add Anchor Link in Classic Editor

If you are still using the older classic editor for WordPress, then here is how you can add the anchor link.

Step 1. Create the anchor link

First, select the text that you want to change into the anchor link and then click on the ‘Insert Link’ button.

Adding an anchor link in Classic Editor

After that, you need to add your anchor link with a # sign prefix followed by the slug you want to use for the link.

Step 2. Add the ID attribute to the linked section

The next step is to point the browsers to the section you want to show when users click on your anchor link.

For that, you’ll need to switch to the ‘Text’ mode in the classic editor. After that scroll down to the section that you want to show.

Adding anchor ID in Classic Editor

Now locate the HTML tag you want to target. For example, <h2>, <h3>, <p>, and so on.

You need to add the ID attribute to it with your anchor link’s slug without the # prefix, like this:


<h2 id="best-coffee-shops-manhattan">

You can now save your changes and click on the preview button to see your anchor link in action.

How to Manually Add Anchor Links in HTML

If you are used to writing in the Text mode of the old Classic Editor in WordPress, then here is how you would manually create an anchor link in HTML.

First, you need to create the anchor link with a # prefix using the usual <a href=""> tag, like this:


<a href="#best-coffee-shops-manhattan">Best Coffee Shops in Manhattan</a>

Next, you need to scroll down to the section that you want to show when users click on the link.

Usually, this section is a heading (h2, h3, h4, etc.), but it could be any other HTML element or even a simple paragraph <p> tag.

You need to add the ID attribute to the HTML tag, and then add the anchor link slug without the # prefix.


<h2 id="best-coffee-shops-manhattan">Best Coffee Shops in Manhattan</h4>

You can now save your changes and preview your website to test the anchor link.

This method is suitable for users who regularly publish long-form articles and need to create table of contents with anchor links.

The first thing you need to do is install and activate the Easy Table of Contents plugin. For more details, see our step by step guide on how to install a WordPress plugin.

This plugin allows you to automatically generate a table of contents with anchor links. It uses headings to guess the content sections, and you can customize it fully to meet your needs.

Upon activation, simply go to Settings » Table of Contents page to configure plugin settings.

Easy Table of Contents plugin settings

First, you need to enable it for the post types where you want to add table of contents. By default, the plugin is enabled for pages, but you can also enable it for your posts as well.

You can also enable the auto-insert option. This allows the plugin to automatically generate the table of contents for all articles, including the older articles that match the criteria.

If you only want to automatically generate table of contents for specific articles, then you can leave this option unchecked.

Next, scroll down a little to select where you want to display the table of contents and when you want it to be triggered.

Select where and when to display table of contents

You can review other advanced settings on the page and change them as needed.

Don’t forget to click on the ‘Save Changes’ button to store your settings.

If you enabled the auto-insert option, then you can now view an existing article with the specified number of headings.

You’ll notice that the plugin will automatically display a table of contents before the first heading in the article.

If you wanted to manually generate table of contents for specific articles, then you need to edit the article where you want to display a table of contents with anchor links.

On the post edit screen, scroll down to the ‘Table of Contents’ tab below the editor.

Manually add table of contents with anchor links

From here, you can check the ‘Insert table of contents’ option and select the headings you want to include as anchor links.

You can now save your changes and preview your article. The plugin will automatically display a list of anchor links as your table of contents.

Table of contents preview

For more detailed instructions, see our article on how to add table of contents in WordPress.

We hope this article helped you learn how to easily add anchor links in WordPress. You may also want to see our tips on how to properly optimize your blog posts for SEO and our pick of the best WordPress page builder plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Source link

How to Open External Links in a New Window or Tab with WordPress


Do you want to open external links from your blog posts in a new window?

Opening external links in a new window allows your users to visit the link without leaving your website.

Many beginners struggle with finding the option to open a link in a window mainly because it is not instantly visible when you are adding a link in WordPress.

In this beginner’s guide, we will show how to easily open external links in a new window on your WordPress site. We will also show different methods to do that, so you can choose the one that best suits you.

How to open external links in a new window

Why and When You Should Open External Links in a New Window?

External links are links to websites that you don’t own or control. Normally, if you add a link to an external website your visitors will simply leave your site by clicking on the link.

While some user experience experts say that you should not open external links in a new window, we do not agree with that.

You see, most users easily forget the last website they were visiting. If they have multiple tabs open then chances are that they will never be able to find your website again.

For better user experience, we recommend opening external links in a new window or tab. This way the original web page is not lost and users can resume browsing your website by switching back.

Another benefit of opening external links in a new window is increased page views and user engagement on your site. Users are more likely to return to the previous tab and finish reading the article.

Users who spend more time on your site are more likely to join your email newsletter, follow you on social media, leave a comment, and buy your products.

That being said, let’s take a look at how to easily open external links in a new Window in WordPress.

Open External Link in New Window in Gutenberg Editor

The new WordPress block editor has a built-in feature that lets you open external links in a new window. However the option is hidden behind a button which is why beginners often don’t notice it.

Simply edit a blog post or page where you want to add an external link. Next, select the text you want to link and then click on the insert link button (or press CTRL + K on Windows / Command + K on Mac).

Open link in new tab

This will bring up the insert link popup. Simply enter the link and then click on the down arrow next to it. This will reveal the option to open the link new tab.

Click to toggle the option and then press enter. Your selected text will now be linked, and you can preview it by visiting your website.

Open External Link in a New Window Using Classic Editor

WordPress introduced a new block editor with WordPress 5.0. Many users prefer to use the old editor by installing the classic editor plugin.

If you are still using classic editor, then we will recommend you to start using the new editor. It is modern, faster, and includes many new features that you are missing out.

However, if you still want to use the classic editor, then this is how you would open a link in a new window using the classic editor.

First, you need to edit the post or page where you want to add the link. Next, select the text that you want to link and then click on the add link button.

Add new link in classic editor

A popup would appear where you can add your external link. After that, click on the gear icon next to it. This will bring up the advanced insert link popup.

Open link in new tab using the classic editor

From here you need to check the box next to ‘Open link in a new tab’ checkbox and then click on the ‘Update’ button to add your link.

You can now save your post and preview it to see the link in action.

Open a Link in New Tab Using Text Tab in Classic Editor

If you are using the HTML editor labeled ‘Text‘ in the old classic editor, then here is how you would open an external link in a new window.

Add link button in the Text editor

Simply select the text that you want to link and then click on the Add Link button. This will bring up the advanced Insert link popup.

Adding a link in plain text editor using the classic editor

From here, you can add the link and check the box next to ‘Open link in new tab’ option. After that click on the Add Link button and the popup will disappear. You will now see the HTML code for the link in the text editor.

HTML code for the external link

You can now save your changes and view the post to see the external link in action.

How to Open External Links in a New Window using HTML

Sometimes you may need to write HTML to add a link in WordPress. For example, when you are using the HTML mode in the new block editor or adding a link in a WordPress theme template file.

You’ll need to add the link using the following HTML code.


<a href="http://example.com" target="_blank" rel="noopener">Link Text</a> 

Simply replace the example.com with the external link URL, and the Link Text with the text you want to link.

The target parameter in this code tells browsers to open the link in a new window or tab.

Automatically Open All External Links in New Window with a WordPress Plugin

It may sound like extra work to manually check the option for every external link that you add. However, over time you will get used to it.

If you run a multi-author blog or often forget to make external links open in a new tab, then you can use a plugin for that.

First, you need to install and activate the Open External Links in a New Window plugin. For more details, see our step by step guide on how to install a WordPress plugin.

The plugin works out of the box, and it will automatically open external links in a new window.

It does not actually change the external links in your blog posts. Instead, it uses JavaScript to open external links in a new window.

Note: Keep in mind that deactivating the plugin will stop opening external links in a new window.

We hope this article helped you learn how to easily open external links in a new window in WordPress. You may also want to see our ultimate list of the most useful WordPress tips, tricks, and hacks that you can use on your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Source link

How to Add Nofollow Links in WordPress (Beginner’s Guide)


Are you wondering how to add nofollow links in WordPress? When you link to an external website, search engines pass a small part of link authority from your website to the other website.

Since you don’t own or control those third-party websites, it is usually a SEO best practice to add nofollow attribute to those links.

In this article, we’ll explain what is nofollow links, and how you can add nofollow links in WordPress posts, pages, and navigation menus.

How to Add Nofollow Links in WordPress - Simple Guide for Beginners

Here’s a quick overview of what you’ll learn in this article:

A nofollow link is a type of link that tells search engines to not pass any link authority from your page to the other website that you’re linking to. You can turn any link into a nofollow link by adding the following link attribute: rel=”nofollow”.

Links or backlinks are an important search engine ranking factor.

When you link to a website, search engines consider that as a ranking signal, and they will pass a small portion of your page authority (link juice) to the other website.

Some SEO experts believe that by making external links nofollow, their own website will rank higher.

How to Check if a Link is Nofollow?

All nofollow links must contain the rel=”nofollow” HTML attribute.

Here’s an example HTML code of a nofollow link:

<a href="https://example.com" rel="nofollow">Google</a>

To check whether a nofollow attribute is added to a link on a website, you need to take your mouse to that link, right click on it, and then select Inspect on your browser.

Check nofollow attribute in the link

Your browser window will now split into two parts.

In the bottom window, you will be able to see the HTML source code of the link along with the nofollow attribute.

As a general best practice, you should add nofollow to all external websites that you don’t trust.

It’s completely acceptable and actually recommended to link to authority websites like Wikipedia, WPBeginner, New York Times, etc without the nofollow attribute because linking to authority sites help you add credibility to your own website.

However we always recommend users to nofollow less credible websites or websites that you simply don’t trust.

The following are some cases when you should always add nofollow attributes to the links:

1. Affiliate and Sponsored Links

Most bloggers make money online using affiliate marketing.

Affiliate links are tracking links for products and services that you recommend and get referral commissions for if someone purchases your link.

Whether you’re using a direct affiliate link or cloaking it using Pretty Links, you should always add nofollow attribute to affiliate links.

Another popular way bloggers make money is by adding sponsored links. You should always add nofollow to sponsored links because otherwise search engines may consider your site as selling links / spammy.

2. External Links

Sometimes, you may link to an external source to provide a reference to your statement. Since you don’t control the content on those websites, you should consider adding nofollow to them.

In simple words, you are telling the search engines that you are linking to a source, but it is not something you can vouch for.

Note: You don’t need to nofollow a link to an authority website.

3. Sidebar Links

Some bloggers add a list of external or affiliate links to the sidebar of their WordPress blog. These external links can be from authority sites or websites that they trust.

The problem is every time a new page is created on your site, you are creating a new backlink for those websites from your sidebar.

It is important to make these links nofollow and make sure that you are not passing the SEO juice from every page to certain links.

Since Gutenberg is a new WordPress content editor, the old nofollow plugins for WordPress are not yet compatible with it.

Currently, the only way to add nofollow links in Gutenberg is to do it manually.

Let’s take a look at the step by step process on how to add nofollow links in WordPress posts or pages with Gutenberg.

First, you need to go to Posts » Add New from the left sidebar of your admin panel.

On this page, you need to select the text that you want to add a link to, and then click on the “anchor / link” icon.

select text to add link in Gutenberg Editor

This will open a text field just below the selected text. You can paste the external link directly in the box.

If you want the link to open in a new tab, then you need to click on the down arrow icon. This will open a menu where you have to click on the “Open in New Tab” toggle box.

Add external link to the textbox

Once done, you can click on the apply or Enter icon to add the link.

To add the nofollow attribute to your link, you need to select the block containing your link and then click on the 3 vertical dots icon present at the top bar.

Select edit as HTML option from the top bar

This will open a menu where you need to click on the Edit as HTML option.

You will now see the HTML code of your link. Go ahead to add the rel=”nofollow” attribute to the link element.

rel nofollow attribute to link

If you see the rel=”noopener noreferrer” attribute in the HTML code, then add a space after noreferrer and paste nofollow after that.

Once done, you can click on the 3 vertical dots icon again and select the Edit visually option to go back to the visual format.

Select edit visually option

This will convert your normal link to a nofollow link. You can follow the same process for adding nofollow attribute to all other external links.

Although it is recommended to upgrade to the newer version of WordPress, some users still prefer to use the Classic Editor for writing their posts.

Unlike the default editor, you can easily add nofollow links in the Classic Editor with the help of a plugin.

First thing you need to do is install and activate the Title and Nofollow For Links plugin. You can follow our guide on how to install a WordPress plugin for help.

This plugin works out of the box, and there are no settings for you to configure.

Head over to Posts » Add New to create a new post. You need to add some text to the post editor and select the text that you want to link. Next, click on the Link icon present in the toolbar.

Add Link to WordPress Classic Editor

After that you can add the external link to the textbox field below and click on the gear icon to open the Link options.

This will open up a modal window where you will see a nofollow checkbox just below the “Open link in a new tab” option.

Go ahead to select the Add rel=”nofollow” to link checkbox and then click on the Update button.

Add Nofollow attribute to a link in WordPress Classic Editor

This allows you to add a nofollow attribute to any link when writing a post. This is also useful for users who are not confident with editing HTML code.

Most bloggers select the “Open link in a new tab” checkbox as well when adding an external link. This is a great way to reduce bounce rate and keep your visitors from leaving your website.

You have already learned how to add nofollow links in the Gutenberg editor manually. However, that method is only useful when you want to add the nofollow attribute to some of your links.

If you have a lot of external and affiliate links in your post, then you should switch to the Code Editor to add nofollow attribute faster.

Open code editor to edit external links

Simply, click on the 3 vertical dots icon, present at the top-right corner of the page. This will open a dropdown menu where you need to select the Code Editor option.

You will now see the HTML code of the page. Next, search for the external and affiliate links and then, add the nofollow attribute to all of them.

Add nofollow to external links

Once done, you need to click on the “Exit Code Editor” link to revert to the visual editor.

If you’re using the Classic Editor, then you can easily use a plugin to add nofollow links. However, you can also add nofollow links manually.

To do that, you need to switch to the Text Editor by clicking on the Text tab. Next, you can add rel=”nofollow” to any link you want.

Add nofollow attribute to links in classic text editor

To go back to the visual editor, you have to click on the Visual tab, placed just beside the Text tab.

Some bloggers and site owners may add external links to the navigation menu of their website.

While adding a nofollow attribute to WordPress menu links is extremely simple, it is not as clearly visible.

Let’s take a look at how to add nofollow links in WordPress navigation menus.

First, you need to click on Appearance » Menus from the left sidebar of your admin panel.

Next, select the menu where you want to add the external link and then click on the Select button to open it.

Select a navigation menu to edit

After that, you need to click on the “Custom Links” tab to add the link text and external link URL. Once done, you need to click on the “Add to Menu” button to create a new menu item.

Add Custom Link to Navigation menu in WordPress

The external link will now appear in the Menu Structure column along with the other menu items.

Next, click on the Screen Options button at the top-right corner of the screen and select the Link Relationship (XFN) and Link Target options.

Screen Options navigation menus

Now scroll back down and click on the downward arrow icon of the new menu item to expand it. Here you will find the “Link Relationship” and “Open link in a new tab” options, just below the Navigation Label textbox.

Add nofollow to Link Relationship XFN option

To add the nofollow attribute, you need to write nofollow in the Link Relationship (XFN) textbox. You can also check the “Open link in a new tab” option if you want.

Click on the Save Menu button

Lastly, click on the Save Menu button to store your changes. This will add the nofollow attribute to the external link in your WordPress menu.

Some WordPress users want to automatically add the nofollow attribute to all external links on their site.

Most solutions that offer this are done with the help of JavaScript which is not helpful for Google and the SEO of your site. Instead, you should manually nofollow the links using the above methods.

In case you are concerned about the comment section, then the good news is that WordPress already adds the nofollow attribute to all comment links by default.

If you’re still looking for a solution to automatically nofollow the external links, then you can use the External Links plugin.

It adds the rel=”nofollow” attribute to all the external links on the posts, pages, navigation menus, and the sidebar.

To install the External Links plugin, head over to Plugins » Add New from the left sidebar of your admin panel.

Upon activation, you need to go to Settings » External Links page.

External Links plugin settings page

Here you need to select the “Add No Follow” checkbox. If you want the external links to open in a new tab, then you should select the “Open in New Windows” checkbox as well.

This plugin also allows you to add a list of domains and subdomains which should not be made nofollow.

To do that, you need to scroll down to the bottom of the page and then add the domains, separated by commas or space, to the “Domains to Exclude” textarea.

Domains to exclude nofollow attribute

Once done, you should click on the Save Changes button to store the settings.

That’s all! This plugin will now make all the external links nofollow on your site automatically.

We hope this guide helped you to learn how to add nofollow links to your WordPress site. You may also want to read our beginner’s guide to image SEO, and our ultimate guide for blog post SEO to help you further optimize your blog posts.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.



Source link