Best practice for adding links to your website | Cosmic Skip to main content

Best practice for adding links to your website

Links are an important feature on any website - they have an impact on your SEO and are also great for directing traffic.

There are a few things you need to consider when adding a link to your website, so we have broken them down for you so that you can incorporate them onto your website.

Choosing the right target option is very important. There are two main options - "Same window" and "New window". These may sometimes be stylised as "_self" and "_blank". By default, most content management systems will apply the _self target to the URL - this means that when the link is clicked, the target URL opens in the same window you are currently in, effectively replacing what you are currently seeing. The _blank option allows the target URL to open in a new tab or window (this depends on your browser).

You may be wondering which option you should be choosing - the answer to this is both! The recommended format for linking is to link internal pages with _self and external pages with _blankThis way, when someone goes to another website, yours will still be open in another tab and they won't forget about you.

It's extremely important to make sure you have the URL set correctly so that the user gets to the right destination rather than a 404 error page.

You should make sure that you add http:// before the www. - some websites will give an error message if this is not included, and some may replace it with your own domain, causing the link to break completely.

You also need to consider what text you are linking. Try to avoid linking full sentences - this can start to look messy on the page.

Stick to linking just the appropriate, key text in the sentence. If you have a sentence that says "Click here to read our 2015 financial report",  you do not need to link the whole sentence, just the text that says "Click here" or "here". This makes the page tidier and more concise.

Alt tags are essential for accessibility. The alt tag will be read by screenreaders and other site readers as an alternative to the image or link. They are vital for your website as they make sure that the content of your site is easy to understand and available to everyone who wants to view or read it.

Being accessible is a key SEO ingredient – if your website is not accessible, it can fail many common SEO tests and therefore suffer rank-wise.

An additional benefit is that it provides a semantic description of links for search engines to index. This can attract extra traffic through Google and will have a positive impact on your search engine optimisation – if done correctly.

However, it is important to note that adding good alt text is not going to suddenly take your website to number one on Google – instead it is one of many on-page factors that cumulatively contribute to improved SEO performance.