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
-
When domain a buys domain b (whose links direct to c), does domain a has links redirecting to domain c ?
Hi, I really need to know what happens when a company or domain (a) acquires another company with domain (b) with its links pointing to yet another location (c). Does company a then have redirects to c?
Intermediate & Advanced SEO | | Yeshourun0 -
Is a scholarship seen as buying links?
We work in the student loan debt industry, so providing a scholarship for our viewers makes total sense for our business. Would links to this page be seen by Google as buying links? Does this fall anywhere into gray-hat tactics? My gut tells me no because helping people with student debt is what we do. The scholarship really synergizes with our business model, but who knows..?
Intermediate & Advanced SEO | | DemiGR0 -
What is the difference between link rel="canonical" and meta name="canonical"?
Hi mozzers, I would like to know What is the difference between link rel="canonical" and meta name="canonical"? and is it dangerous to have both of these elements combined together? One of my client's page has the these two elements and kind of bothers me because I only know link rel="canonical" to be relevant to remove duplicates. Thanks!
Intermediate & Advanced SEO | | Ideas-Money-Art0 -
14,000 links from affiliate
I have an active affiliate program and notice that webmaster tools is showing a huge number of links from one particular affiliate. The affiliate is called productwiki.co.uk and they are showing 14,413 links all pointing to my homepage in WMT. They don't seem to be no follow. What should I do about this? Is this a problem? I have had major issues with my organic traffic dropping right off. I appreciate any feedback
Intermediate & Advanced SEO | | Aikijeff0 -
Linking to Short vs Long URL
Suppose I have a long url on an established site and created a shorter version of it so it is easier for people to enter directly and click. I 301 the short version to the long. I don't think there is much concern for people linking to the long version pages, but will there be a tendency for people to link to the short url instead of the long for the domain links? Will I not benefit as much from links to the short vs the long? Thanks.
Intermediate & Advanced SEO | | AWCthreads0 -
How should I handle these links?
I recently purchased a site which is in the same niche as my personal blog. MANY of the keywords which I want both sites to rank for, they are already ranking well for (Eg I rank #1 with one site and #5 for the other). I haven't started linking the two sites to each other yet (waiting to announce the acquisition before I do). I have 2 questions for you all... How powerful do you think linking between these sites could be? How do you think I should handle the linking between these two sites?
Intermediate & Advanced SEO | | PedroAndJobu0 -
Links to Facebook pages
I would like to ask if anyone has any knowledge regarding linking to a company's facebook page. I have built a few links to a client's facebook page in an effort to have it rank better in SERPs. I just learned that unlike twitter and linkedin, it is apparently not possibly to directly link to facebook pages. At least it is not possible from a search engine's perspective. If you follow any facebook page link while you are not logged into facebook, you are redirected to the facebook home page. I can't think of any way around this obstacle. I'd love some clever solution such as providing a URL which includes a basic dummy facebook login but there is nothing I am aware of to achieve this result. Does anyone have any ideas on this topic?
Intermediate & Advanced SEO | | RyanKent0 -
Sitewide blog link and Article links
Hi Guys I just wanted to give you all a heads up on something I adjusted recently that worked really well and wanted to ask for your own experiences on this. 1. We have a blog that adds regular content and within the blog we link from the keyword we are targeting. Standard stuff right ! We were struggling for movement on a keyword so I removed the links from the articles and added a link on the site wide blogroll. The link on the blogroll included the keyword but was a longer descriptive link. Low and behold we got a first page listing when the changed it.The change in ranking was made a few days later. I have always been given the impression that site wide isn't that great ? So explain this one . Of course there are many other factors etc 🙂 What are your experiences and thoughts on what happened here ?
Intermediate & Advanced SEO | | onlinemediadirect0