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
-
More internal links pointing to internal page vs homepage
I was looking at our GSC internal links section and I saw that we have 901 internal links going to our compare rates form and 890 going to our homepage. At the end of most of our content I add a call to action to our compare rates form. Is this SEO friendly or should I have more pointing to the homepage and less pointing to our compare rates page?
Intermediate & Advanced SEO | | LindsayE0 -
Cross Linking two related ecommerce websites
Hi Guys, Hope you'll be able to help me with a technical problem I am facing right now. We are a company right ? We own 2 webistes. Let's say one sells car parts, the other one buys second hand car parts to refurbish them and sell them. (It is not our case, just an example very similar to ours). sellparts.com buyparts.com Both are ecommerce websites, with large catalogues (7000 skus). sellparts sells a lot and is a big actor in its market. buyparts.com doesn't work nad has a really low DA. My new SEO external consultant, which I am not too convinced about, is telling me to cross link the sites on product level using cross-linking extensions. He want have them do-follow. That would mean having hundreds or thousands of links with really similar linking patterns. buy [parts] [model ] [make] sell [parts] [model ] [make] That to me seems a bit too much and I am worried it compromises the sellparts site's SEO. So should i no-follow the links ? Or do it differently ?
Intermediate & Advanced SEO | | Kepass0 -
Hammered by Spam links
When we moved from one host to another in Wordpress engine, we had this insertion weird redirect thing happen. We 410'd the page cgi-sys/movingpage.cgi, but it hit us hard in the anchors. If you go to ahrefs, we are literally all Asian in anchors text. Anybody have any suggestions, thank goodness it looks like it finally stopped. I am looking for creative ways to repopulate our back end with the right stuff. Any thoughts would be great! Heres a example: allartalocaltours.com/tumi-tote-401.html ↳customerbloom.com/cgi-sys/movingpage.cgi ↳www.customerbloom.com/cgi-sys/movingpage.cgi ↳lockwww.customerbloom.com/cgi-sys/movingpage.cgi
Intermediate & Advanced SEO | | mattguitar990 -
Which links to disavow?
I've got a new client that just fired their former SEO company, which was building spammy links like crazy! Using GSC and Majestic, I've identified 341 linking domains. I'm only a quarter of the way through the list, but it is clear that the overwhelming majority are from directories, article directories and comment spam. So far less than 20% are definitely links I want to keep. At what point do I keep directory links? I see one with a DA of 61 and a Moz spam score of 0. I realize this is a judgement call that will vary, but I'd love to hear some folks give DA and spam numbers. FWIW, the client's DA is 37.
Intermediate & Advanced SEO | | rich.owings0 -
Consensus on Paying to Remove Links
Hi all, For discussion... I am painstakingly working my way through a link profile, highlighting 'unnatural links' and contacting webmasters to try and get the links removed - I haven't got as far as 'disavow' or a 'Reconsideration Request' I have found a large number (around 150) of links from http://www.bookmarks4you.com and when I have attempted to contact the site for link removals I have had a payment request in order to do so. Now the amount being requested is low and so it may be worthwhile, however, I wondered what the consensus was with regards to this sort of demand? I know I could simply add the links to my 'disavow list' but for the sake of a small payment, I could get rid of them much quicker! Also, the majority of sites that I am contacting only have a contact from as opposed to an email address that I can use directly - what I am doing is taking a screen print of each contact form in order to have proof that I am actually doing the 'hard graft' as opposed to simply adding sites to a disavow list - is this a worthwhile exercise? Many thanks Andy
Intermediate & Advanced SEO | | TomKing0 -
How many links home on a page?
We are planning on a mega menu which will have around 300 links and a mega slider which will have around 175 links if our developer has their way. In all I could be looking at over 500 links from the home page. The Mega Menu will flatten the site link structure out but I am worried this slider on the home page which is our 4th most visited page behind our 3 core category pages. What are your thoughts?
Intermediate & Advanced SEO | | robertrRSwalters0 -
Link Building Tactics for 2012?
Hi all! Happy New Year! Just wanted to pop in here and start a discussion to see what are some of the most effective link building techniques you'll be using for 2012? -Andy
Intermediate & Advanced SEO | | alhallinan1 -
Should I remove paid links?
I recently added about 20 paid links from directories but have since seen a 10% drop in traffic. I did also delete about 1000 pages of content that had no inbound links and were duplicated on other sites on the web and replaced the content with new content supplied by a client but still duplicated on other sites on the web, old URLs no longer valid or linked to, new content on new URLs. Assuming the drop in traffic had nothing to do with the content change mentioned above, should I remove the paid links in an attempt to recover? I don't think the old content was bringing in much traffic as it appeared elsewhere on more authoritive sites than mine.
Intermediate & Advanced SEO | | Mulith0