Mobile app version of vmapp.org
Login or Join
Gretchen104

: Absolute vs Relative url Am developing a website, I have used many anchor link in menu navigation and given absolute url. Somewhere I read we can also use relatives url in menu navigation.

@Gretchen104

Posted in: #Navigation #RelativeUrls #Seo #Url

Am developing a website, I have used many anchor link in menu navigation and given absolute url. Somewhere I read we can also use relatives url in menu navigation. From SEO point of view, let me know which one is better for menu navigation in both Absolute and relative url ?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

5 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

For SEO, full absolute URLs are better, for a variety of reasons such as links not working when shared or from email clicks. There's no point in writing great, long content and optimized to be searched when relative path urls confuse the spider bots, make it easy for content to be stolen, and might bring an error page when clicked from email or a shared link. This has been circulated for some years now and our developers always use full absolute URLs. Search Engine Journal wrote about it in 2008:
www.searchenginejournal.com/seo-internal-interlinking-relative-vs-absolute-urls/7000/
and recently MOZ:
moz.com/blog/relative-vs-absolute-urls-whiteboard-friday
and Yaost:
yoast.com/dev-blog/relative-urls-issues/

10% popularity Vote Up Vote Down


 

@Gloria169

There are some very good reasons to NOT use relative URL's

A very common problem is that webmasters will maintain two different versions of their site -- one as a development directory, and one as a live directory.

If you're not hiding the dev directory, you can run into duplicate content issues which can negatively impact SEO.

There's a good (recent) discussion of other positives/negatives here: moz.com/blog/relative-vs-absolute-urls-whiteboard-friday

10% popularity Vote Up Vote Down


 

@Jennifer507

For SEO there is no difference, unless of course they are incorrect.

I constantly see websites where an incorrectly defined relative URL missing a prefix forward slash along with non working 404's create spider traps of never ending URLs.

e.g
www.example.com/relative/ http://www.example.com/relative/relative/ www.example.com/relative/relative/relative/ http://www.example.com/relative/relative/relative/relative/


These 'spider' traps then create an infinite amount of duplicate pages and use up Google's crawl budget. Both bad for SEO.

10% popularity Vote Up Vote Down


 

@Welton855

From an SEO point of view, the only thing that matters is that the URL is correctly pointing to a resolvable document. The reason for this is that all URL's, absolute or relative, are resolved as an absolute URL.

Absolute URL's are inflexible as they don't adapt to their context. Though if they're generated on the fly from a system then that's not a big problem.

Relative URL's come in different forms and there are some benefits.


Page relative URL's (e.g. ../../about.html)
Domain relative URL's (e.g. /about.html)
Protocol relative URL's (e.g. //example.com/about.html)


Each behaves differently, and the benefits / disadvantages depends on your own situation.

Page relative URL's are fragile and rely on a consistent relationship between the linking document and linked-to document. If this relationship changes then broken links will occur.

Domain relative URL's stay on the same domain and using the same protocol, but otherwise specify a full path. This removes the coupling between the linking document and the linked-to document, though clearly links may still break with movement of pages.

Protocol relative URL's are great for calling resources from other subdomains or domains, but retaining the protocol in use. This is especially effective for resource linked to from a page which may be served with either http or https. The protocol relative link ensures that all resources are requested with the same protocol, which stops warnings on https pages about unencrypted resources.

You should evaluate each on its ability to continue to resolve to reachable documents - if all your links are auto generated then absolute URL's are fine. If not, domain relative URL's offer a lot of flexibility and protocol relative links are great for assets served over either http or https.

10% popularity Vote Up Vote Down


 

@Deb1703797

AFAIK, not really a noticable difference.
I prefer relative (always from document root, but no domain).
If you'd change to https, you don't need to update every internal link in my website. If you rename your site, or change from 'always ' to 'never ' (for whatever reason) you don't need to update everything.
This pro increases when you created chached html files yourself.

And a tiny bonus, it saves a few bytes of html per link (very tiny bonus).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme