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
-
Bad Domain Links - Penguin? - Moz vs. Search Console Stats?
I've been trying to figure out why my site www.stephita.com has lost it's google ranking the past few years. I had originally thought it was due to the Panda updates, but now I'm concerned it might be because of the Penguin update. Hard for me to pinpoint, as I haven't been actively looking at my traffic stats the past years. So here's what I just noticed. On my Google Search Console - Links to your Site, I discovered there are 301 domains, where over 75% seem to be spammy. I didn't actively create those links. I'm using the MOZ - Open site Explorer tool to audit my site, and I noticed there is a smaller set of LINKING DOMAINS, at about 70 right now. Is there a reason, why MOZ wouldn't necessarily find all 300 domains? What's the BEST way to clean this up??? I saw there's a DISAVOW option in the Google Search Console, but it states it's not the best way, as I should be contacting the webmasters of all the domains, which is I assume impossible to get a real person on the other end to REMOVE these link references. HELP! 🙂 What should I do?
Intermediate & Advanced SEO | | TysonWong0 -
Link-building best SEO practice (one-off VS periodic blogging)
Hi all, Generally, what would be best when building a website's ranking through link building? Having the same links from the same bloggers or receiving new links from different bloggers every time? A lot of the SEO services offer 4-8 blog backlinks per month. Would it be best if these links came from different sources every time or most from the same sources each month? I know there's a lot of factors but I hope this question is clear. Happy holidays and thank you for your insightful feedback. Carlos
Intermediate & Advanced SEO | | 90miLLA0 -
Company Blog at a different URL
Ok, I have been doing a lot of work over the past 6 months, disavowing low quality links from spammy directories to our company website, etc. However, my efforts seem to have had a negative, not positive effect. This has brought me back to reconsidering what we are doing as we have lost a good amount of traction on the nationwide Google rankings specifically. Considering our company blog - platinumcctv(dot)net - we have used this blog for a long time to inform customers of new products, software developments and then to provide them links to purchase those components. Last week, I revamped the nearly default wordpress theme to another on a piece of advice. However, someone told me that all of our links should be nofollow, even though it is a company blog because we have many links coming from this domain, and it could be found as spammy. Potato/Potato - But before I start the tedious task of changing every link to no follow on a whim, i searched a lot, but have found no CLEAR substantiation of this. Any ideas? Other recommendations appreciated as well! Platinum-CCTV(dot)com
Intermediate & Advanced SEO | | PTCCTV0 -
Meta NOINDEX and links into the pages?
If I have internal links pointing to pages that are META NO INDEX, will Google still index them? Or does that only apply to pages that are linked to from an external domain? Thanks!
Intermediate & Advanced SEO | | bjs20100 -
Do nofollow links affect link profile?
I've read that it's good to keep a natural link profile. Some naked links, some links going to our company name, some with anchor text, etc. Do nofollow links affect this link profile, or is it only followed links that are taken into account?
Intermediate & Advanced SEO | | lighttable0 -
Content linking ?
If you have links on the left hand side of the website on the Navigation and content at the bottom of the page and link to the same page with different anchor text or the same would it help the page (as it is surrounded by similar text) or is the first one counted and this is it?
Intermediate & Advanced SEO | | BobAnderson0 -
Which link url placement to buy - High PR vs. High PA?
I'm about to buy one directory link (just the one!) but can't decide which URL to place my link on in that directory because of the varying metrics - which is better of the below (bearing in mind my own site is still a PR0 sitewide)? www.exampledirectory.com/categoryA/subtategory1/
Intermediate & Advanced SEO | | emerald
Metrics: 21 linking domains, PA 44, DA 59, PR0 www.exampledirectory.com/categoryA/
Metrics:1 linking domain, PA 35, DA 59, PR5 I know PR is no longer relevant and usually ignore this metric (except for possible penalties) and just focus on Seomoz toolbar metrics, but as my own site itself is PA:37 and DA:28 homepage but PR0 completely sitewide (over 6 months old but relatively new site), I thought this might help to balance things. Thanks for your advice.0 -
Linking to Authorities
Hello, I know that if its good for the user, its not a bad move. But for this question I am specifically asking for how it affects my ranking. Does it help my ranking to link to appropriate authority sites?
Intermediate & Advanced SEO | | tylerfraser
Have you done any tests to see if linking out to authoritative sites like .gov info pages, industry leaders, etc. help with a sites ranking. I am thinking about taking of all of these outgoing links and just link to my important pages. Thank you, Tyler0