Relative paths vs absolute paths for links - is there a difference?
-
-
I almost always use absolute URLs. Dana has a point about efficiency, and a lot of developers HATE writing anything but relative URLs, but I think most modern servers can handle the load just fine, and developers can be bribed with cookies.
The advantage of Absolute URLs is they're less likely to break with various CMS's (content management systems) and on-page elements. I've seen javascript do some crazy things to relative URLs causing 1000's of broken, uncrawlable links.
And when your content is scraped, either for black hat reasons or perfectly legitimate reasons like embedded RSS feeds, then you get full credit for the link. But to be fair, and to recognize Gamer07's point, Google likely devalues most of these links anyway once they detect the duplicate content.
-
Well, if we go like that. Wouldn't it also involve a risk of negative SEO? A site who rips content from another is more likely to be considered a spam site. (linking to your site now)
-
However, if you use absolute URLs, if your content gets ripped off you have links back to your own content now, and people can know it's your content. It can also help to force http or https.
-
Thank you for the invaluable information
-
Hi Cenk,
Yes, it is better to use relative paths when linking on your site to your internal pages. This reduces the number of server calls on a page and can increase your page speed and efficiency. Now, does that factor specifically factor into algorithm? I don't know. But page speed is part of the algorthm, so I suppose you could say that indirectly it does have an effect on algorithms and how your site potentially ranks.
One caveat: Use absolute URLs for your canonical tags. Search engines have problems interpreting relative URLs when they are in a canonical tag. I learned this the hard way!
Hope that helps!
Dana
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Difference hummingbird and rankbrain
From my understanding hummingbird is the fact that google is able to parse sentences and link entites to understand the meaning of content in a better way than with just keywords and rankbrain is about user intent, google understands that they are various ways to mean the same thing. Is my understanding correct ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Link Brokers Yes or No?
We have a client who has asked us to talk to link brokers to speed up the back linking process. Although I've been aware of them for ages I have never openly discussed the possible use of 'buying' links or engaging in that part of the industry. Do they have a place in SEO and if so what is the MOZ communities thoughts?
Intermediate & Advanced SEO | | wearehappymedia0 -
Same page Anchor Links vs Internal Link (Cannibalisation)
Hey Mozzers, I have a very long article page that supports several of my sub-category pages. It has sub-headings that link out to the relevant pages. However the article is very long and to make it easier to find the relevant section I was debating adding inpage anchor links in a bullet list at the top of the page for quick navigation. PAGE TITLE Keyword 1 Keyword 2 etc <a name="'Keyword1"></a> Keyword 1 Content
Intermediate & Advanced SEO | | ATP
<a name="'Keyword2"></a> Keyword 2 Content Because of the way my predecessor wrote this article, its section headings are the same as the sub-categories they link out to and boost (not ideal but an issue I will address later). What I wondered is if having the inpage achor would confuse the SERPS because they would be linking with the same keyword. My worry is that by increasing userbility of the article by doing this I also confuse them SERPS First I tell them that this section on my page talk about keyword 1. Then from in that article i tell them that a different page entirely is about the same keyword. Would linking like this confuse SERPS or are inpage anchor links looked upon and dealt with differently?0 -
Link Building Strategy?
If I use unique content written from writers & post it to good sites (free blogs, bookmarking, directory, articles sites, etc.) having nice good cache, good PR, different IP's do i still have a chance of get hit by Spam actions of google? Planning to do like just 30-50 a month all with unique content or say 1 unique content then re-written & used not more than 3 times. If not this then What else would you suggest? One more thing to add up, like i have 1000+ pages out of which i have like 80-90 pages that matters to me (important pages) then how do I spin the anchor text between all the pages. Should i spin them between 1000+ pages or use only 80-90 IMP pages. If the content is 300 words let say then how many anchor tags should i have?
Intermediate & Advanced SEO | | welcomecure0 -
SEO implications of serving a different site on HTTPS vs. HTTP
I have two sites: Site A, and Site B. Both sites are hosted on the same IP address, and server using IIS 7.5. Site B has an SSL cert, and Site A does not. It has recently been brought to my attention that when requesting the HTTPS version of Site A (the site w/o an SSL cert), IIS will serve Site B... Our server has been configured this way for roughly a year. We don't do any promotion of Site A using HTTPS URLs, though I suppose somebody could accidentally link to or type in HTTPS and get the wrong website. Until we can upgrade to IIS8 / Windows Server 2012 to support SNI, it seems I have two reasonable options: Move Site B over to its own dedicated IP, and let HTTPS requests for Site A 404. Get another certificate for Site A, and have it's HTTPS version 301 redirect to HTTP/non-ssl. #1 seems preferable, as we don't really need an SSL cert for Site A, and HTTPS doesn't really have any SEO benefits over HTTP/non-ssl. However, I'm concerned if we've done any SEO damage to Site A by letting our configuration sit this way for so long. I could see Googlebot trying https versions of websites to test if they exist, even if there aren't any ssl/https links for the given domain in the wild... In which case, option #2 would seem to mostly reverse any damage done (if any). Though Site A seems to be indexed fine. No concerns other than my gut. Does anybody have any recommendations? Thanks!
Intermediate & Advanced SEO | | dsbud0 -
How to build links naturally?
Hi, I recently started a website on famous Photoshop images. These are available in the internet, but on different sources, so i gathered them all and made them available in my website. So my content is not unique but it was gathered from different sources and made available in one website. How can i get links naturally? Yes, it is a great content, but how people will know about my site so that they can reblog on their blogs? How can i make the users to reblog my content and get links naturally? Can anyone experienced help me?
Intermediate & Advanced SEO | | hari10 -
Charity links
Quick question - Are links on charity websites with a small mention about what your company does good links to go for?
Intermediate & Advanced SEO | | BobAnderson1 -
Multiple anchor text links
Hi. I wanted to ask about having multiple text links to an internal page from the same page. So I have a section title on my home page which will vary with each article. It may say "Healthiest Cat Foods" as the title then offer a snippet and finally offer a "continue reading..." anchor text. The title is a great link to the article while the "continue reading..." is another link to the same article. I like the to keep the title link because it is perfect anchor text. I like to keep the "continue reading..." because it seems helpful for users. I have read that search engines will only count the first link to an article which is fine as I only want the first one to count anyway. What I am wondering is do I lose any page rank because I added the second link? Does that second link hurt me in any way?
Intermediate & Advanced SEO | | NikkiGaul0