Mobile app version of vmapp.org
Login or Join
Connie744

: In terms of SEO, what are the pros and cons of using dot notation in links? In terms of SEO, is there a best practice for writing the following relative links: href="./foo" href="foo" What

@Connie744

Posted in: #Hyperlink #RelativeUrls #Seo

In terms of SEO, is there a best practice for writing the following relative links:


href="./foo"
href="foo"


What about href="../../../foo"? Is that "difficult" for a bot to follow?

I see most sites use href="/relative/path/to/domain/root". I'm curious as to why.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Connie744

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

I've never seen a crawler or search engine that couldn't handle relative URLs, including the ones with dots in them. For SEO, the dot notation would be just fine. Search engines can follow those links, and assign benefit to them properly.

I stopped using relative directory dots in my links because:


It makes it hard to move pages around. It is much easier to move a page to a new directory when all the links are relative to the root (/).
Directory dots don't work well in templates that can be included in files that live in multiple directories.
Most webservers are configured to serve the same page no matter how many trailing slashes are on the directory. /dir/foo.html and /dir/////foo.html are usually equivelant. However, dot relative links on the latter will be broken.

10% popularity Vote Up Vote Down


 

@Nimeshi995

Do not use dots in your links. While it may be perfectly valid, it is not a good idea in general. Some swear by using the full URL/URI (example.com/content/my-content-page.php) over relative URI only (/content/my-content-page.php). I use relative, however, I do see the point in making full references to help with content scraping and may switch somewhere down the line for this reason. Remember, if you use dot notations, something (browser, search engine, whatever) will have to figure this out which may not yield the results you want. It is better to be at least somewhat verbose in your reference to avoid issues down the line.

As far as SEO is concerned, the dots do not add value. While no-one really knows how search engines handle links fully, Google does tell us that they try and resolve all links and URLs so that they are complete. It is not clear if you get semantic credit for links and URLs filled in by Google at all or if semantics is only applied to links where terms are used in the original link. It is clear that the link URL resolver does run as a separate batch process periodically and that by contrast semantics is applied immediately when the link is discovered. It is just not clear if the semantics is updated. For this reason, make the worse assumption you can (to be safe) and assume that the semantic value of your links is based upon the work you do and spell out each link fully.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme