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
-
Poor internal linking?
Hi guys, Analyzing a large e-commerce site 10,000 pages on Magento and not getting much organic traffic to level 3 sub-category pages, the URLs are like: Primary Keyword Target: BODY MOISTURISERS https://www.adorebeauty.com.au/skin-care/bath-body/moisturisers.html Primary Keyword Target: LIP MASKS https://www.adorebeauty.com.au/skin-care/masks/lip-masks.html Plus another 40 other URLs at level 3 with low organic performance. Authority of the domain is strong, so it's not an authority issue I believe its internal linking. Besides linking form the blog and breadcrumbs is there anything we can do to improve internal linking to these level 3 pages? Cheers.
Intermediate & Advanced SEO | | nattyhall0 -
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 -
Infographic links were good?
I submit infographic to visual.li, source and a little description. Are these links were good for website link profile? And can I submit same inforgraphi to other websites? http://visual.ly/divya-ashwagandha-churna
Intermediate & Advanced SEO | | bondhoward0 -
Should I have as few internal links as possible?
On most pages of my site i have a Quick Links section, which gives x3 cross sales links to other products, a newsletter sign up link, link to Blog, x4 links from images to surveys, newsletters, feedback etc. Will these links be hurting my optimal SEO juice between pages, should the number of internal links be kept to a minimum? My site is www.over50choices.co.uk if that helps. Thanks
Intermediate & Advanced SEO | | AshShep1
Ash0 -
Confusion about forums and canonical links
Like many people, I get a lot of alerts about duplicate content, etc. I also don't know if I am hurting my domain authority because of the forum. It is a pretty active forum, so it is important to the site. So my question is, right now there could be 50 pages like this <domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/
Intermediate & Advanced SEO | | BrickPicker
<domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/page-1
<domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/page-2
<domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/page-3
all the way to:
<domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/page-50</domain></domain></domain></domain></domain> So right now the rel canonical links are set up just like above, including the page numbers. I am not sure if that is the best way or not. I really thought that all the of links for that topic should be
<domain>/forum/index.php/topic/6043-new-modular-parisian-restaurant-10243-is-here/ that way it would passing "juice" to the main topic/link. </domain> I do have other links setup for:
link rel='next',link rel='up',link rel='last' Overall is this correct, or is there a better way to do it?0 -
Google Manual Penalties:Different Types of Unnatural Link Penalties?
Hello Guys, I have a few questions regarding google manual penalties for unnatural link building. They are "partial site" penalties, not site wide. I have two sites to discuss. 1. this site used black hat tactics and bought 1000's of unnatural backlinks. This site doesn't rank for the main focus keywords and traffic has dropped. 2. this site has the same penalty, but has been all white hat, never bought any links or hired any seo company. It's all organic. This sites organic traffic doesn't seem to have taken any hit or been affected by any google updates. Based on the research we've done, Matt Cutts has stated that sometimes they know the links are organic so they don't penalize a website, but they still show us a penalty in the WMT. "Google doesn't want to put any trust in links that are artificial or unnatural. However, because we realize that some links may be outside of your control, we are not taking action on your site's overall ranking. Instead, we have applied a targeted action to the unnatural links pointing to your site." "If you don't control the links pointing to your site, no action is required on your part. From Google's perspective, the links already won't count in ranking. However, if possible, you may wish to remove any artificial links to your site and, if you're able to get the artificial links removed, submit areconsideration request. If we determine that the links to your site are no longer in violation of our guidelines, we’ll revoke the manual action." Check that info above at this link: https://support.google.com/webmasters/answer/2604772?ctx=MAC Recap: Does anyone have any experience like with site #2? We are worried that this site has this penalty but we don't know if google is stopping us from ranking or not, so we aren't sure what to do here. Since we know 100% the links are organic, do we need to remove them and submit a reconsideration request? Is it possible that this penalty can expire on its own? Are they just telling us we have an issue but not hurting our site b/c they know it's organic?
Intermediate & Advanced SEO | | WebServiceConsulting.com0 -
Do 404 Pages from Broken Links Still Pass Link Equity?
Hi everyone, I've searched the Q&A section, and also Google, for about the past hour and couldn't find a clear answer on this. When inbound links point to a page that no longer exists, thus producing a 404 Error Page, is link equity/domain authority lost? We are migrating a large eCommerce website and have hundreds of pages with little to no traffic that have legacy 301 redirects pointing to their URLs. I'm trying to decide how necessary it is to keep these redirects. I'm not concerned about the page authority of the pages with little traffic...I'm concerned about overall domain authority of the site since that certainly plays a role in how the site ranks overall in Google (especially pages with no links pointing to them...perfect example is Amazon...thousands of pages with no external links that rank #1 in Google for their product name). Anyone have a clear answer? Thanks!
Intermediate & Advanced SEO | | M_D_Golden_Peak0 -
Subdomain or directory path?
Hi Mozzers, Client: Important carpet cleaner player in the carpet cleaning industry Main Goal: Creating good content to Get more organic traffic to our main site Structure of the extra content: It will act like a blog but will be differentiated from the regular site by not selling anything but just creating good content. The look and design will be different from the client's site. SEO Question: Which option is more beneficial, creating a subdomain or adding a regular page within the website following a directory path URL? If possible, please state what are the advantages and disadvantages of these 2 options in terms of SEO. Thank you and have a great weekend everyone,
Intermediate & Advanced SEO | | Ideas-Money-Art0