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
-
WooCommere Canonical links relating to products and subscriptions
Hello, Thanks for taking the time to have a read of this, I'm not quite sure of the best way to address this issue. I have a WooCommerce site with Products and Subscriptions, i.e subscribe to buy the product monthly. Because of the way WooCommerce works these are effectively two different pages, for example: https://formnutrition.com/plant-based-nutrition/form-superblend-plant-based-vegan-protein/ and https://formnutrition.com/plant-based-nutrition/superblend-protein-subscription/ Since the second is just a Subscription of the first (Product) it's basically exactly the same content. I'm not sure if I should make the canonical link of the Subscription point to the Product? I would prefer that customers find the Product first and don't want Google to think this is duplicate content. On the other hand it's not strictly duplicate content as they are two different things? Is there any advice or best practice on how to handle this? Many thanks, Damian
Intermediate & Advanced SEO | | damo_form0 -
Should we optimise our internal links?
Hi again, We recently had a technical search audit done by a specialist agency and they discovered a number of internal links that caused redirects to happen. The agency has recommended we update all of these links to link directly to the destination so we don't lose out on link equity. We'd just like to know if you think this would be a worthwhile use of our time. Our web team seem to think that returning a 301 to a crawler means that the crawler will stop indexing the original URL and instead index the redirected destination? Thanks all. Clair
Intermediate & Advanced SEO | | iescape2 -
Slideshare - Links within
Hi Guys I am going to be putting some powerpoint presentations up over time. I have a couple of questions regarding slideshare. If I add links to the slideshare are these crawl able by Google etc...? If I places the powepoint presentation on our website and slideshare would this be counter productive i.e duplicate content? Love to here your suggestions.
Intermediate & Advanced SEO | | Cocoonfxmedia0 -
Can links be hidden?
I was wondering if anyone can help me with some advice on agency work. We have just employed a new SEO agency to conduct work on one of our websites. I took a look on OSE and GWT to see if we had any new links since the agency started working (1 month ago) but there's was nothing new. When l asked for an update as to what link building efforts had been completed last month, l was told they don't give out a list of links as it could compromise the agencies techniques. They told me that they use software to hide links form link aggregators so that our competitors don't know what we are doing. Can anybody confirm that such software exists or is this agency just taking us for a ride? If there is such a software, could this not hinder what links the search engines could see? Any comments would be greatly appreciated.
Intermediate & Advanced SEO | | RobSchofield0 -
Do links to PDF's on my site pass "link juice"?
Hi, I have recently started a project on one of my sites, working with a branch of the U.S. government, where I will be hosting and publishing some of their PDF documents for free for people to use. The great SEO side of this is that they link to my site. The thing is, they are linking directly to the PDF files themselves, not the page with the link to the PDF files. So my question is, does that give me any SEO benefit? While the PDF is hosted on my site, there are no links in it that would allow a spider to start from the PDF and crawl the rest of my site. So do I get any benefit from these great links? If not, does anybody have any suggestions on how I could get credit for them. Keep in mind that editing the PDF's are not allowed by the government. Thanks.
Intermediate & Advanced SEO | | rayvensoft0 -
Bad links
Well just set up SEO Moz to find out someone thought it funny to build a load of links to our site http://bluetea.com.au/ with the anchor txt "Buy Cocks" .... PLEASE PLEASE let me know how much I should worry about this and how can I get rid of it?
Intermediate & Advanced SEO | | Intrested0 -
Links with Parameters
The links from the home page to some internal pages on my site have been coded in the following format by my tech guys: www.abc.com/tools/page.html?hpint_id=xyz If I specify within my Google Webmaster tools that the parameter ?hpint_id should be ignored and content for the user does not change, Will Google credit me for a link from the home page or am I losing something here. Many thanks in advance
Intermediate & Advanced SEO | | harmit360 -
Correcting an unnatural link profile
A site I work with ranked page 1 for a competitive keyphrase until recently. (Not Panda-related as far as we can tell.) We've done extensive on-site tweaking and the page is still parked at 27-32 in the SERPs. We believe the only viable explanation at this point is an unnatural link profile. Over the course of several years the site has racked up a large collection of footer links with anchor text due to business relationships with the sites in question. So the profile is now skewed, with the result as follows: 100,000 domain links (top 10 competitors range 1800-50k) 87% anchor text optimized (competitors 0-41%) 99% follow links (competitors 85-100%) The vast majority of links are footer links We're working on creating more natural, high-value links but this of course takes time. In the short term, two questions: Should we aim to remove or change some of the footer links? If so, do we remove them, or just change anchor text? How many? How many new links should we pursue each month to make a meaningful impact on the profile without being too aggressive? Any other thoughts on how to fix this are also appreciated. Thanks!
Intermediate & Advanced SEO | | kdcomms0