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
-
How Submit to different Countries
Hey There, One of My client Needs To rank his site in multiple Location , like He is in Australia But wants To Promote his Site in Canada, india, USA,So What are the things i can do For Rank in Others Country. Please any Expert Help. Thanx
Intermediate & Advanced SEO | | nupuriepl0 -
Should We Link To Our News?
We just started an "In the News" section on our webpage. We are not sure what would be the best for SEO purposes. Should we link to the news websites that have the stories about our company, even if they have no link bank? Or should we just take screenshots of the news article and only link to articles that link back to us (this is what we a currently doing)? Here is our news page, http://www.buyautoparts.com/News/
Intermediate & Advanced SEO | | joebuilder0 -
Redirect aspx files to a different path structure on a different domain using a different server-side language?
Without getting into the debate/discussion about which server-side language should or should not be used, I am faced with the reality of moving an old ASP.NET site to a Coldfusion one with a different domain and different folder structure. Example: www.thissite.com/animals/lion.aspx --> www.thatsite.com/animals/africa/lion.cfm What is the best way to redirect individual .aspx pages to their .cfm counterparts keeping in mind that, in many cases, the folder paths will be different? If it would mean less work, I am hoping this can be done at the server level (IIS 6) rather than modifying the code on each now-defunct page. And on a related note, how long should any redirects be kept in place? My apologies if this has been answered in this forum in the past, but I did do a lot of searching first (both here and elsewhere) before posting this query.
Intermediate & Advanced SEO | | hamackey0 -
How Come Meta is different based on different query?
We have a site we added a number to in the meta description. Once we did that we did a fetch as google to hopefully recrawl the page quicker. A few days later and we cleared W3 cache on WP and clear computer cache, then did search on common search for the site/page. WidgetA for example. The url is OurClient.com/widgetA/ - on organic in meta on SERP and we see our new meta with number. We then do a search on a similar term WidgetingA for example and the same url shows: OurClient.com/widgetA/ BUT THE meta description is different on SERP! It is the old meta. When we look at the element using mozbar, it shows the new meta as it should same as when we look at it under the original search term. So, search for WidgetA, get new meta in serps and search for WidgetingA (which returns same url as WidgetA) and we get the old meta. Thoughts???
Intermediate & Advanced SEO | | RobertFisher0 -
SEO from links in frames?
A site was considering linking to us. Their web page is delivered entirely via frames. Humans can see the links on the page, but it's not visible in source. I'm guessing it means Google can't detect the links, and there is no SEO effect, but I wanted to confirm. Here's the site: http://www.uofc-ulsa.tk/ Example links are the Princeton Review and Kaplan on the right sidebar. Here's the source code: view-source:http://www.uofc-ulsa.tk/ Do those links have any SEO impact?
Intermediate & Advanced SEO | | lighttable0 -
Is this link SEO-Friendly?
Hi Mozzers, Was wondering if someone could tell me if this link is SEO-friendly? class = "sl">name="sc" type="checkbox" value="1449"><a <span="">href</a> <a <span="">="</a>http://www.example.com/" onclick = "Javascript: return dosc(2);">src="imsd/coff.gif" id="cbsc2"/>Keyword It has some Javascript that makes the link work like a filter. Cheers, Carlos
Intermediate & Advanced SEO | | Carlos-R0 -
Alternative links in the search results.
Hello, This is a short question Please look at this SERP screenshot: http://imgur.com/1EMen Who do they get the other links under their results. Cornel
Intermediate & Advanced SEO | | Cornel_Ilea0 -
Dark Matter Links
From 2007 - 2004 I worked for Sprint in several positions with my last one being a Corporate Account Manager for fortune 1000 customers. In 2004 I left Sprint after the Nextel merger and created an eCommerce site called thesprintstore.net as a Sprint Nextel preferred partner. I used my inner working knowledge of Sprint to my wonderful advantage and began making 3x my original salary. My desire for more business turned to greed and I began leaking information that consumers loved i.e. phone release dates, price points, warehouse stock levels and tricks of the trade. This garnered me thousands of links from big sites (had no idea at the time) and eventually my site was issued a Cease and Desist order from Sprint's Corporate Headquarters. I recently realized one evening that I had a GEM of a domain with powerful backlinks that I could redirect to my current site TECHeGO.com [staff removed hyperlink]. (Some of the back links are from Engaget, Engaget Mobile, Rimmarkable and even one from Sprint.) The redirection has been in place for months now and I have confirmed that all that sweet Link Nectar is flowing through! I have found it interesting, however, that my back link and referral domain count have never increased leading me to believe that in doing a 301 Redirect existing links become what can only be described as 'Dark Matter Links' i.e. the links are there, simply invisible. Dark Matter Definition: dark matter is matter that is inferred to exist from gravitational effects on visible matter and background radiation, but is undetectable by emitted or scatteredelectromagnetic radiation. Dark Matter Links: dark matter links are visible links that have passed through a 301 redirect which are now inferred to exist but are no longer visible by crawlers? Is there a better definition that could be applied to the term 'Dark Matter Links'?
Intermediate & Advanced SEO | | TECHeGO1