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
-
Demoting a URL (not-WMT Related)
I have a pharmaceutical brand that treats two diseases, but wants to primarily promote one. We want searches for "brand dosing" to go to Side A, but currently "brand dosing" goes to Side B. BUT, I want "brand dosing Side B" to still show up in organic search, so a noindex on Side B, or canonicalization of Side A, won't work. Essentially, I want any searches that are not specific to a disease treatment to go to Side A, and then specific Side B related searches, go to Side B. Because this is a client paying me to optimize their site, I obviously want to optimize their whole site, so only optimizing Side A, or unoptimizing Side B, aren't solutions I want to employ. I don't think a solution exists, but I figured my fellow Mozers would know best. Thanks in advance,
Intermediate & Advanced SEO | | GTO_Pharma_SEO0 -
Link building strategy
Hello Moz Community, For the last couple of months we have been trying to improve our ranking in Google UK for the keyword "church candles" http://www.wattsandco.com/church-supplies/church-candles.html We’ve been contacting relevant interiors/lifestyle blogs to feature our candles including anchor text linking back to our page. Our anchor text has been predominately our brand (Watts & Co) but also other key search terms (Watts and Co church candles, Watts and Co pillar candles). We have been tracking our ranking for the keyword “Church candles” using the Moz “ Rank Tracker” and we started on position 15 in Google UK. We went up to 12 briefly before moving down every week to 15, 17, 19 and 22. We checked today and we have moved back up slightly to 19. Our progress seems to be a bit slow and inconsistent. We wanted to reach out for any advice on how we can move up? If there was any way we can improve our strategy? Here’s the links we have built so far: http://nostalgiecat.blogspot.co.uk/2015/10/what-autumn-means-to-me.html http://blog.pollyrowan.com/2015/10/5-small-ways-to-decorate-your-home-that.html http://www.happyhomebird.com/2015/10/watts-co-candles-for-cosy-autumn-home.html http://www.frolic-blog.com/2015/10/beeswax-candles-for-fall/ http://hisforhomeblog.com/lighting/watts-co-church-candles/#axzz3qhqN1wzA http://lorilangille.blogspot.co.uk/2015/11/sponsored-post-watts-and-co.html http://www.californiahomedesign.com/product-finds/waxing-poetic-must-have-candles Thanks so much!
Intermediate & Advanced SEO | | roberthseo0 -
Links on page
Hi I have a web page which lists about 50-60 products which links out to either a pdf on the product or the main manufacturers website page containing product detail. The site in non e-commerce is this the site/page likely to get hit by Penguin? Would it be best to create a separate page for the product/manufacturer group i.e 5 or 6 pages but linking out to the PDFs etc...?
Intermediate & Advanced SEO | | Cocoonfxmedia0 -
Paid Links on Credible Sites
Hi people. I'm wondering, what would be the effects of having a paid link on a credible site. The site would feature a brand page about my site and link to it. The site has a good domain authority and they are credible with quality content. Ultimately though the link would be paid. Would Google treat this negatively? Or would they pick up on it at all? Thanks, Paul
Intermediate & Advanced SEO | | kevinliao0 -
Footer link - Created by
Hi everyone We created a website for our customer, and we wanted to have a footer link: "Created by WebPerfection.biz" Some Marketing company advised our customer, that it will hurt their SEO if they have that link for us in footer Would you guys advice on this please? Thank you P.S. site for our customer: www.azsedans.com
Intermediate & Advanced SEO | | DavidIRC0 -
Does the number of links on a page metric include repeated links?
Just wondering if the number of links on the page metric includes links that are repeated? So, if I had 100 links to one page would this count as 100 or 1 link?
Intermediate & Advanced SEO | | Cornwall
If it's the former does this mean more links to one page adds weight? Thanks0 -
SubDomain vs. SubFolder
I know this subject has been discussed many, many times before. But it is now 2013, and Google continues to tweak and change their algo to build upon the best delivered results for users. So the questions are: Does Google still treat subdomains as a completely separate and unique domain from the root? If so, is it a good SEO strategy to split up, when it fits, a website into subdomains with links pointing back to the root or main domain? As a company we have several subdomains with some of our categories. For example our main site is www.iboats.com. This site has all our boat products. But we set up subdomains several years ago for the following: boatcovers.iboats.com boatpropellers.iboats.com biminitops.iboats.com And we have our fourms as a subdomain: forums.iboats.com Splitting them out were originally done for SEO reasons, but now is more for better managing our main categories. It appears that Google is treating our subdomains as part of our main root domain anyway, so I don't see the SEO value anymore. If we were to move the subdomains into subfolders of the root, I'm wondering if we might see a boost in SEO value having more pages within the main website? I'd be interested in everyone's thoughts on this subject.
Intermediate & Advanced SEO | | tdawson090 -
Best links to gain?
Hi, Just a quick one to see what peoples thoughts are regarding links. I have just gained a free link on a .gov website in the UK. In one of their offers pages, will this provide any link value or domain trust to me and what can the benefits be SEO wise from having a link on a government domain? The link is just the website url with a a few lines of text detailing our address etc... so its not got any anchor text regarding targetting one of our brands. It is equallly, less or more important to target anchor text links to specific brands or to get good high quality links from trusted sites such as the .gov one I have linking to my root domain? The website is a local council website in the UK. And was listed by a member of their staff, who only list in the offer page if your offering discount to council members etc..., so its not a spammed page or anything like that. What are peoples views on anchor text links vs domain url links? Cheers Will
Intermediate & Advanced SEO | | YNWA0