Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Så här add to Nofollow Links i WordPress (enkel guide för Beginnare)

Undrar du hur du kan add to nofollow links i WordPress?

Kanske har du hört talas om nofollow links, men du är inte säker på vad de är eller ej varför du ska använda dem.

I den här artikeln visar vi dig hur du enkelt addar nofollow-länkar i WordPress. Vi går också igenom vad nofollow-länkar är och varför de är viktiga.

Adding nofollow links in WordPress

Här är en snabb översikt över vad vi kommer att täcka i den här artikeln. Klicka bara på dessa länkar för att hoppa direkt till olika sections:

En nofollow-länk är en typ av länk som talar om för search engines att inte skicka någon länkbehörighet från din page till den andra website som du länkar till. Du kan göra vilken länk som helst till en nofollow-länk genom att lägga till länkattributet rel="nofollow”.

Links eller backlinks är en viktig faktor för search engine ranking.

När du länkar till en extern webbplats betraktar search engines det som en signal för ranking, och de kommer att överföra en liten del av din auktorisering (länkjuice) till den andra webbplatsen.

Vissa experter på sökmotorsoptimering tror att externa länkar som inte följs kan hjälpa din egen WordPress website att rankas högre. Detta har dock inte visat sig vara fallet.

För några år sedan meddelade Google att deras search-algoritm nu använder nofollow som en antydan snarare än ett direktiv för crawl och indexering.

Hur man kontrollerar om en Link är Nofollow

All nofollow links innehåller HTML-attributet rel="nofollow ”.

Här är HTML-koden för ett exempel på en nofollow-länk:

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

Om du vill kontrollera om taggen nofollow är add to en länk på en website måste du föra musen till länken, högerklicka på den och sedan välja ”Inspect” i webbläsaren.

Check nofollow attribute in the link

Fönstret i din webbläsare kommer nu att delas i två delar.

I panelen Inspect kommer du att kunna se HTML-källkoden för linken tillsammans med nofollow-attributet.

Alternativt kan du använda en Chrome-utökning som gillar Strike Out Nofollow Links. Då kan du omedelbart se vilka links som har attributet nofollow.

Som en allmän bästa praxis för sökmotorsoptimering bör du add to nofollow till alla externa websites som du inte litar på.

Det är helt godkänt och rekommenderas faktiskt att länka till auktoriserade webbplatser som Wikipedia, WPBeginner och New York Times utan nofollow-attributet. Linking to authority sites helps add credibility to your own website.

Vi rekommenderar dock att du använder nofollow links till mindre trovärdiga websites.

Här är några fall då du alltid bör add nofollow-attribut till links:

1. Affiliate- och sponsrade länkar

Många bloggare tjänar pengar online med hjälp av affiliate-marknadsföring.

Affiliate-länkar är tracking-länkar för produkter och tjänster som du rekommenderar. Du får en referral-provision om någon köper efter att ha gått via din link.

Du bör alltid add to nofollow-attributet till affiliate links. Detta gäller om du använder en direkt affiliate-länk eller döljer den med hjälp av Pretty Links.

Ett annat populärt sätt för bloggare att tjäna pengar är att lägga till sponsrade länkar. Du bör alltid nofollow sponsrade länkar. Annars kan search engines anse att din WordPress site säljer länkar eller skräppost. Detta kan leda till att du straffas i sökmotorns resultat.

Tips: Under 2019 introducerade Google ytterligare några länkattribut. Om du vill kan du använda sponsored i stället för nofollow för affiliate- och sponsrade links. För våra syften har det samma effekt.

2. Externa länkar

Ibland kan du länka till externa källor som referenser. Eftersom du inte kontrollerar innehållet på dessa websites bör du överväga att lägga till nofollow på dem.

Enkelt uttryckt säger du till search engines att du länkar till en källa, men det är ej något som du kan gå i god för.

Note: Du behöver inte använda nofollow-länkar till auktoriserade websites.

3. Links i sidebar

Vissa bloggare add to en lista med externa länkar eller affiliate-länkar till sidebaren på sin blogg i WordPress. Dessa externa länkar kan vara från auktoriserade webbplatser eller webbplatser som de litar på.

Problemet är att varje gång en ny sida skapas på din site skapar du också en ny backlink för dessa webbplatser från din sidebar på den sidan.

Det är viktigt att göra dessa länkar nofollow. På så sätt överför du ej sökmotorsoptimeringen från varje page till vissa links.

Det enklaste sättet att add to nofollow links till din site är att använda All in One SEO (AIOSEO) plugin för WordPress. Med det kan du add to nofollow-attributet utan att behöva editera någon HTML-kod. Du kan använda gratis- eller premiumversionen av AIOSEO plugin.

Först installerar och aktiverar du All in One SEO Premium eller AIOSEO gratis plugin. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett plugin för WordPress.

Efter aktivering skapar du en new page eller post och add to ankartexten för din link. Därefter väljer du ankartexten och clickar på link icon.

Highlighting text and clicking the link icon in the block editor

Detta kommer att öppna en box för din link, med flera alternativ som du kan toggle på eller av.

Vi rekommenderar att du aktiverar både alternativet ”Open in a new tab” och ”Add ”nofollow” to link”.

The nofollow attribute option added by All-in-One SEO

Link: Många bloggare selectar checkboxen ”Öppna länken i en new tab” när de lägger till en extern länk. Detta är ett bra sätt att förbättra engagement och hindra dina visitors från att lämna din website.

När du är klar klickar du bara på ↵-pilknappen eller trycker på ”Enter” på ditt tangentbord. Detta adderar omedelbart nofollow-länken till din page eller post.

Använda All in One SEO för att lägga till en Nofollow Link i Classic Editor

Även om vi rekommenderar att du använder Block Editor föredrar vissa användare fortfarande att använda Classic Editor för att skriva posts och skapa pages.

AIOSEO låter dig enkelt add nofollow links i den klassiska Editorn också. Öppna bara den post eller page som du vill edit.

Lägg sedan till lite ankartext för din Link, markera den och klicka på knappen Link. Enter sedan din link.

Adding a link in the classic editor, using the link button

Klicka nu på ikonen för kugghjul för att öppna inställningarna för länken. Efter det, kontrollera boxen för ”Add rel="nofollow ” to link”.

Du kanske också vill ställa in din link så att den öppnas i en new tab. När du är klar klickar du på knappen ”Add Link”.

The nofollow option added by All-in-One SEO, in the classic editor

Din nofollow-länk kommer sedan att addas till din WordPress post.

Om du inte vill använda AIOSEO plugin måste du manuellt lägga till nofollow links i WordPress block editor.

Låt oss ta en titt på steg-för-steg-processen för hur du lägger till nofollow links i WordPress posts eller pages med block editor.

Först går du till PostsAdd New för att skapa en ny page.

Som tidigare väljer du ankartexten för din link och clickar på link icon. Gå vidare och enter din länk.

Om du vill att länken ska öppnas i en new tab, toggle du bara det alternativet.

Entering the text for the link and (optionally) setting it to open in a new tab

När du är klar klickar du bara på ↵-pilknappen eller trycker på ’Enter’ på tangentbordet för att lägga till länken.

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 in the top bar.

Opening up the 'More Options' dropdown for your block

Detta öppnar en dropdown-meny.

Du måste klicka på alternativet ”Edit as HTML”.

Selecting the option to edit your block as HTML

You will now see the HTML code of your link. Gå vidare och add attributet rel="nofollow ” till länkelementet.

Om du ser attributet rel="noopener noreferrer ” i HTML-koden addar du bara nofollow inom citattecknen.

Adding the nofollow attribute to the link in your HTML code

När du är klar klickar du bara på ikonen med de tre punkterna igen.

Välj sedan ”Edit visually” för att gå tillbaka till det visuella standardformatet.

Switch back to editing your block visually

Detta kommer att konvertera din normala link till en nofollow-länk. Du kan följa samma process för att lägga till nofollow-attributet till alla andra externa länkar.

Även om AIOSEO är det enklaste sättet att lägga till nofollow-länkar kan du också lägga till länkar manuellt om du använder den klassiska Editorn.

Först går du till Pages ” Add New för att skapa en ny page. Add to en ankartext för din link, markera den och click the link button. Enter sedan din link.

Adding a link in the classic editor, using the link button

Om du vill att din länk ska öppnas i en ny tabb klickar du bara på kugghjulsikonen och klickar på checkboxen ”Öppna länk i en ny tabb”.

Klicka sedan på knappen ”Add Link”.

Setting a link in the classic editor to open in a new tab

Nu klickar du på tabben Text i den klassiska editorn. Du behöver bara add rel="nofollow ” till länken här.

Om rel="noopener ” redan finns, är det bara att add to nofollow också.

Adding the nofollow attribute in the classic editor

Du har redan lärt dig hur du lägger till enskilda nofollow-länkar i Gutenberg Editor manuellt. Den metoden är dock bäst när du bara har planer på att add to ett fåtal nofollow-länkar.

Om du har många externa och affiliate-länkar i din post bör du byta till Code Editor. Då kan du add to nofollow-attributet snabbare.

Open code editor to edit external links

På vyn för redigering av post eller page klickar du på ikonen med 3 vertikala prickar i det övre högra hörnet. Detta öppnar en dropdown-meny.

Välj helt enkelt alternativet ”Code Editor”.

Using the code editor view instead of the visual view of your blocks

You will now see the HTML code of your page. Gå vidare och hitta alla dina externa länkar och add nofollow-attributet till var och en av dem.

När du har gjort det måste du klicka på alternativet ”Visual Editor” för att växla tillbaka.

Att lägga till ett nofollow-attribut till dina WordPress-links i menyn är extremt enkelt, men alternativet är inte särskilt synligt. Det är därför många WordPress användare inte ens inser att det finns där.

Låt oss ta en titt på hur du addar nofollow links i WordPress navigations menyer.

Först måste du gå till sidan AppearanceMenus i din WordPress-admin.

Välj sedan den menu där du vill add to den externa länken. Gå vidare och klicka på knappen ”Select” för att öppna den.

Select a navigation menu to edit

Efter det måste du click the ”Custom Links” tabs to add the link text and external link URL.

När du är klar klickar du på knappen ”Add to Menu” för att skapa ett nytt menu item.

Add Custom Link to Navigation menu in WordPress

Den externa länken kommer nu att visas i kolumnen Menu Structure tillsammans med de andra menu items.

Därefter klickar du på knappen ”Screen Options” högst upp till höger på sidan.

Screen Options navigation menus

Du behöver bara välja alternativen ”Link Relationship (XFN)” och ”Link Target”.

Nu rullar du ner igen och klickar på ikonen med nedåtpilen på det nya menu-item för att förstora det.

Add nofollow to Link Relationship XFN option

För att add to nofollow-attributet skriver du bara nofollow i textrutan ”Link Relationship (XFN)”. Du kan också kontrollera alternativet ”Öppna länken i en new tab” om du vill.

Glöm inte att clicka på knappen ”Save Menu” för att save dina ändringar.

Click on the Save Menu button

Vissa användare av WordPress vill automatiskt add to nofollow-attributet till all externa links på sin site.

De flesta lösningar som erbjuder detta görs med hjälp av JavaScript. Detta är inte till hjälp för Google eller för sökmotorsoptimeringen av din webbplats. Istället bör du manuellt nofollowa länkarna med hjälp av metoderna ovan.

Vissa bloggare oroar sig för links i kommentarer. Den goda nyheten är att WordPress add to nofollow-attributet till all comment links som standard.

Om du fortfarande letar efter en lösning för att automatiskt nofollowa alla externa länkar, kan du använda WP External Links plugin. Det adderar nofollow-attributet till alla externa links i dina posts, pages, navigation menus och sidebar.

Först måste du installera och aktivera pluginet WP External Links. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett WordPress plugin.

Efter aktivering, gå till den nya External Links page i din WordPress dashboard.

Setting up the External Links plugin

Här måste du ändra dropdown ”Set follow or nofollow” till ”nofollow”.

Ovanför detta har du alternativet att ställa in länkar så att de öppnas i en new tab med hjälp av ”Open external links” dropdown.

Using the plugin to set external links to be automatically nofollowed

Glöm inte att klicka på knappen ”Save Changes” när du är slutförd. Detta plugin kommer nu automatiskt att göra alla externa länkar på din site till nofollow-länkar.

Nu när du vet hur du addar nofollow-länkar kanske du gillar att se några andra WordPress tutorials relaterade till att använda links:

Vi hoppas att den här guiden hjälpte dig att lära dig hur du addar nofollow links i WordPress. Du kanske också vill se vår guide för nybörjare till Image SEO eller våra expertval för de bästa WordPress LMS-tilläggen för att bygga onlinekurser.

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

47 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    it’s awesome that the new WP version (6.5) now includes the option to add no-follow atrribute natively. I’ve been waiting for an easy way to add the nofollow links in images

    • Moinuddin Waheed says

      It is a good idea to use the no follow link from the default editor.
      But assuming the importance of seo, almost everyone used AIOSEO or some other seo plugins. We can always use this to make the link as no follow link.

  3. Jeff says

    Why would you not just put a global nofollow in robots.txt and then individually allow certain links to be ”follow” post by post?

    • WPBeginner Support says

      Your robots.txt would normally be best used for only your site’s links which is why we don’t recommend that method.

      Administratör

  4. Moinuddin Waheed says

    Adding a nofollow link to the external links seems promising for seo and rankings.
    It is best to argue that we should not use nofollow to credible websites but only to less credible websites.
    I have doubt here regarding less credible sites.
    Why would anyone use external links as a reference for less credible or no credible sites?

    • WPBeginner Support says

      It would depend on the content being covered by the site for what external links would make sense.

      Administratör

  5. mohadese esmaeeli says

    I have previously read that the ratio of follow and nofollow links should be considered and logical. Well, according to human logic, the number of nofollow links should naturally be higher. However, utilizing follow links from valuable websites can also be effective in the growth of the site. What factors should we consider when deciding whether to consider a link as follow or nofollow?

    • WPBeginner Support says

      The main thing to keep in mind is to a high value or authority site and that would normally be when you would not need to use nofollow.

      Administratör

  6. Jiří Vaněk says

    I’ve read that from an SEO standpoint, it’s better to have external links as nofollow. This way, the search engine robot focuses more on internal links on the website. Therefore, I’ve set all external links as nofollow via a plugin. Is this a good technique, or is it better to make exceptions for high-quality links from domains with high domain authority?

  7. Joseph Mucira says

    Sure! Making external links is a great way to give your juicy backlinks breathing space and a chance to rank higher on search engine results pages for the likes of Google, Bing, Yandex, Yahoo, DuckDuckGo, etc. Remember, too many links on one page/blog may feel like spam in the eyes of the search engine crawling bots. So, to offset the workload, a dofollow link function helps minimize the chances of overusing links on any given piece. This article has helped us (webmasters) with more ways to address the same adequately. We hope to see more resources from you soon.

    Kudos for the excellent job well done!

    • WPBeginner Support says

      Thank you for sharing this feedback and yes too many links can look spammy to search engines.

      Administratör

    • WPBeginner Support says

      It would depend on on your niche, normally it would be a site you trust that you would confidently send your users to visit.

      Administratör

  8. Hibble Dibble says

    ”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. This is not helpful for Google or for your site’s SEO.”

    I kinda understand why it’s not helpful for Google as it looks at dofollow links as a ranking factor. But why would having all external links as nofollw be bad for your site’s SEO?

    • WPBeginner Support says

      Linking to credible sites can be helpful to show you know which site is trustworthy sources for your users which can help your ranking.

      Administratör

  9. Profcyma Global says

    Thanks for sharing all the option possible to render nofollow external links.

    But don’t you think noreferer noopener means nofollow as well, too.

    • WPBeginner Support says

      If you have an SEO plugin, there is normally an option added in the page’s settings to nofollow a page.

      Administratör

  10. Susan says

    How do I add a no follow to links in the photo caption? Image credits contain links to the photographer and the site I downloaded it from.

    • WPBeginner Support says

      For the simplest method, you could use the external links plugin from this article.

      Administratör

  11. Bala says

    Nice Post,

    May I Know that rel=”nofollow noreferrer opener” and rel=”noreferrer opener nofollow ” both are same? I don’t know exactly where I need to insert ”nofollow” when it comes to ”noreferrer opener”.

  12. Jeremiah Pittmon says

    I activated the External Links plugin and saved the changes, but when I check the HTML code in the post, I don’t see ”no follow” anywhere in the code. Is it supposed to show up there?

  13. Mariza says

    Hi there,

    Can you perhaps suggest another plugin to use with the Classic Editor?

    It seems ‘Title & No Follow for links’ is outdated . Im getting this msg:

    “This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.”

    TIA

  14. Graham Drew says

    Every time i try to achieve this i break my post and get an error message ,but i suspect the message is caused by myself not entering the code correctly (i have no coding experience) my little portion of code looks different to your example.for individual links

    Solution i entered the code manually using the code editor as described in your tutorial and that seemed to work this method was much easier for me.

  15. Graham Drew says

    This tutorial is incorrect I keep getting error messages that has ruined my post and I cannot recover them.This Block Has Encountered An error and Cannot Be Previewed

  16. Marnick says

    Hi, is there a way to add a no-follow to a WooCommerce product affiliate link (without a plugin).
    Ex. I can add a product in WooCommerce and change from a ”Simple product” to a ”Extern/Affiliate product”. I can insert the link, but not edit any html or option to set to no follow.
    Thanks.

    • WPBeginner Support says

      You would want to reach out to WooCommerce’s support for how to customize the external link to be nofollow when there is not a default option to.

      Administratör

  17. Swapnil Harpale says

    Thanks for sharing all the possible option to make external links nofollow.

    But don’t you think that noreferer noopener also means nofollow.

    • WPBeginner Support says

      While they look similar, those are used for slightly different reasons than nofollow. Nofollow is more for crawlers such as Google to not follow that link in terms of SEO while noreferrer and noopener limits how much the site you link to knows about your link to the site.

      Administratör

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.