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
-
Example of secondary related keyword
Hello, Can someone give me an example of primary and secondary related keyword for the keyword "Provence bike tour " ?
Intermediate & Advanced SEO | | seoanalytics0 -
Related Topics
Hello, Imagine that my keyword is "Corsica cycling holidays" and that my related topics are the island of Corsica, Lavezzi island, Porto, Piana, Calvi. When I POS tags my sentence do those topic need to come out as subjects ? or do I just need once corsica bike tour as subject (subject of my sentence) and then can I include Calvi, Porto, Piana just as keyword throughout my content even though they aren't subject ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
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 -
Subdomains vs. Subfolders vs. New Site
Hello geniuses!!! Here's my Friday puzzle: We have a plastic surgery client who already has a website that's performing fairly well and is driving in leads. She is going to be offering a highly specialized skincare program for cancer patients, and wants a new logo, new website and new promo materials all for this new skincare program. So here's the thing - my gut reaction says NO NEW WEBSITE! NO SUBDOMAIN! because of everything I've read about moving things on and off subdomains, etc (I just studied this: http://moz.com/blog/subdomains-vs-subfolders-rel-canonical-vs-301-how-to-structure-links-optimally-for-seo-whiteboard-friday). And, why wouldn't we want to use the authority of her current site, right? While she doesn't necessarily have a high authority domain - we're not talking WebMD, here - she does have some authority that we've built over time. But, because this is a pretty separate product from her general plastic surgery practice, what would you guys do? Since we'll be creating a logo and skincare "look and feel" for this product, and there will likely be a lot of information involved with it, I don't think we'll be able to just create one page. Is it smart to: a) build a separate site in a subfolder of her current site? (plasticsurgerypractice.com/skincare) b) build a subdomain? (skincare.plasticsurgerypractice.com) c) build her a new site (plasticsurgeryskincare.com)
Intermediate & Advanced SEO | | RachelEm0 -
Extensions Vs Non Extensions
Hello, I'm a big fan of clean urls. However i'm curious as to what you guys do, to remove them in a friendly way which doesn't cause confusion. Standard URLS
Intermediate & Advanced SEO | | Whittie
http://www.example.com/example1.html
http://www.example.com/example2.html
http://www.example.com/example3.html
http://www.example.com/example4.php
http://www.example.com/example5.php What looks better (in my eyes)
http://www.example.com/example1/
http://www.example.com/example2/
http://www.example.com/example3/
http://www.example.com/example4/
http://www.example.com/example5/ Do you keep extensions throughout your website, avoiding any sort of confusion and page duplication; OR Put a canonical link pointing to the extension-less version of each page, with the anticipation of this version indexing into Google and other Search Engines. OR 301 Each page which has an extension to an extension-less version, and remove all linking to ".html" site wide causing errors within software like Dreamweaver, but working properly. OR Another way? Please emphasise I'm sorry if this is a little vague and I appreciate any angles on this, I quite like clean url's but unsure a hassle-less way to create it. Thanks for any advice in advance0 -
Unnatural Links Removal - are GWMT links enough?
Hi, When working on unnatural links penalty, is removing and disavowing links shown on the GWMT enough or should the list be broaden to include OSE and Majestic etc.? Thanks
Intermediate & Advanced SEO | | BeytzNet0 -
Site wide footer links vs. single link for websites we design
I’ve been running a web design business for the past 5 years, 90% or more of the websites we build have a “web design by” link in the footer which links back to us using just our brand name or the full “web design by brand name” anchor text. I’m fully aware that site-wide footer links arent doing me much good in terms of SEO, but what Im curious to know is could they be hurting me? More specifically I’m wondering if I should do anything about the existing links or change my ways for all new projects, currently we’re still rolling them out with the site-wide footer links. I know that all other things being equal (1 link from 10 domains > 10 links from 1 domain) but is (1 link from 10 domains > 100 links from 10 domains)? I’ve got a lot of branded anchor text, which balances out my exact match and partial match keyword anchors from other link building nicely. Another thing to consider is that we host many of our clients which means there are quite a few on the same server with a shared IP. Should I? 1.) Go back into as many of the sites as I can and remove the link from all pages except the home page or a decent PA sub page- keeping a single link from the domain. 2.) Leave all the old stuff alone but start using the single link method on new sites. 3.) Scratch the site credit and just insert an exact-match anchor link in the body of the home page and hide with with CSS like my top competitor seems to be doing quite successfully. (kidding of course.... but my competitor really is doing this.)
Intermediate & Advanced SEO | | nbeske0 -
Is there an optimal ratio of external links to a page vs internal links originating at that page ?
I understand that multiple links fro a site dilute link juice. I also understand that external links to a specific page with relevant anchortext helps ranking. I wonder if there is an ideal ratioof tgese two items
Intermediate & Advanced SEO | | Apluswhs0