We continuing to giving you hints about SEO. Today we will give you a brief information about usage of rel=”external” command which is important in SEO. Actually most of us knows rel=”external” command. But after evolution by time, It’s changed into new shape. External commands shape is target=”_blank” as we know.
Why we use rel=”external” for WordPress?
We using rel=”external” instead of target=”_blank” for external links goes out from our site. This is an important part in SEO. This command does; where rel=”external” link passes, open it in new page.
This codes meaning are actually confused with nofollow or dofollow commands in Worlds top webmaster sites. You should keep in mind that there is just a single mission of this code so that is open link in new page.
Lets give some examples to the external commands usage;
This command is a standart code and open links in new page.
dailydesignnotes.com
This command opens your links in new page. It has dofollow feature. Search engines follows given code. Link contributes address you give.
dailydesignnotes.com
This link open your link in new page and tell search engines to “don’t follow this link”. Tt does not contributes given address.
dailydesignnotes.com
Now i will give you information about how you entegrate this code into your WordPress blogs. Copy javascript codes i give below, and create a file named external.js by Dreamweaver or Notepad++ or a similar text editor.
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i
If you want to add a nofollow feature to the links, copy codes below into the external.js file and save.
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i
Paste code below to the above of
tag in header.php file of your theme.
Now last step. Use link structure below inside anywhere you want in website for use external nofollow feature.
An example usage;
Daily Design Notes
We made a detailed article before about How to Make WordPress Post and Post Type Count. We highly recommend you to read it.