Links not including the "http://www."

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Links not including the "http://www."

Post by meritweb »

We are using the Source Code view to post our blog articles and when we insert a hyperlink using the full domain address - the blog seems to strip it of our domain root. So instead of it being "http://www.xyz.com/article.html" it strips it down to "/article.html".

How can I fix this as our articles are syndicated on others websites and we need the full links?
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Links not including the "http://www."

Post by Don Chambers »

Hey Josh. Do you have an example of this? How are you inserting the links... as <a href="http://www.xyz.com/article.html">Link text</a>, or are you simply inserting "http://www.xyz.com/article.html" into the entry?
=Don=
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Links not including the "http://www."

Post by meritweb »

Example:
http://www.meritsolutions.com/meritmatt ... obile.html
https://community.dynamics.com/ax/b/mer ... obile.aspx

We are going into the source code and posting it into <a href="...">text</a>.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Links not including the "http://www."

Post by Don Chambers »

So, you inserted this:

Code: Select all

<a href="http://www.meritsolutions/technology/enterprise-mobile-solutions.html">Microsoft Dynamics AX Mobile</a>
But it gets trimmed to this:

Code: Select all

<a href="/technology/enterprise-mobile-solutions.html">Microsoft Dynamics AX Mobile</a>
Is that correct?
=Don=
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Links not including the "http://www."

Post by meritweb »

Correct!
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Links not including the "http://www."

Post by Don Chambers »

Does it trim the link if you insert it using the link button in the editor?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Links not including the "http://www."

Post by garvinhicking »

Hi!

First off: It's actually a good thing that those links are stripped. It's always better to have relative URLs in your entries, simply because if you ever change the host, the entry links will work properly.

Now for the reason - I believe if you use the WYSIWYG editor, it does this relpacement. Also, the xhtmlcleanup event plugin provides such a "cleanup" option if I remember correctly...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Links not including the "http://www."

Post by Don Chambers »

garvinhicking wrote:Hi!

First off: It's actually a good thing that those links are stripped. It's always better to have relative URLs in your entries, simply because if you ever change the host, the entry links will work properly.
But in his case, its not such a good thing. His entries are being fed to other sites, I assume via rss, and that relative link - once posted on another site - is invalid, because it does not point to his domain.
=Don=
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Links not including the "http://www."

Post by onli »

Relative links in rss are automatically rewritten. If that is not working, that would be an important bug to fix.
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Links not including the "http://www."

Post by meritweb »

Hi Everyone - Sorry, I was traveling this week.

1. Yes, it seems to do it when I click Insert Link as well.
2. While it may make sense to have relative URLs for future ease of use - it is not SEO friendly. Which is one of the main reasons why people blog - to increase the SEO of their site. If our articles get picked up on Microsoft's website - that brings a lot of authority to our article. However, we lose ALL of that when people can't click through.

Recommendations?
erAck
Regular
Posts: 236
Joined: Mon Feb 16, 2015 1:20 am

Re: Links not including the "http://www."

Post by erAck »

meritweb wrote:If our articles get picked up on Microsoft's website
How does it get picked up? See above, RSS should deliver the fully qualified URL.
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Links not including the "http://www."

Post by meritweb »

The blog is syndicated via the RSS feed.

I don't think the issue is the RSS - it is the blog. If I use the WYSIWYG editor, the blog shortens the links.

If I turn the WYSIWYG editor off - then the blog does not shorten the link. It keeps the root domain - which is what I want.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Links not including the "http://www."

Post by garvinhicking »

Hi1

Where do you get the fact from that the absolute http-Link would be required? That goes against HTML conformity...every spider, robot, SEO-tool would automatically deduce the proper FQDN (domain name) first based on the host, then overriden by a possible base-href tag, then override by an absolute link.

Really there shouldn't be any need to have an absolute link, it would not increase SEO. See http://blog.squareroot-inc.com/should-i ... -purposes/ for a better formulated answer. ;)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
meritweb
Regular
Posts: 43
Joined: Fri Jan 25, 2008 3:40 am

Re: Links not including the "http://www."

Post by meritweb »

OK, regardless of whether having "http://www.domainname.com/..." or just "/..." as the link helps or hurts SEO is moot at this point.

If people subscribe to our RSS feed, or read our blog on another site which is syndicated from our RSS feed, then ALL of our links will be broken. Therefore, they are not able to access the content we discuss in our articles.

That for sure is not a best practice.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Links not including the "http://www."

Post by garvinhicking »

Hi!

Then I misunderstood you, I thought you were saying that the RSS-Feed was fine. Sorry, I was really focussing on the actual need for absolute links on the page itself.

The RSS feed actually only puts in absolute URLs if those lie within the Serendipity directory. Your links point outside of that.

Thus, it really will be the only way to be properly addressed to change the WYSIWYG editor to not parse out absolute links. Can you tell me how exactly you enter your links? I just tried with my Serendipity 2.0 instance with the default CKEditor, and when I mark a word and click on the link-button to insert a hyperlink, I can properly insert a full domain name there:

https://www.dropbox.com/s/446o56btovd12 ... 2.png?dl=0

https://www.dropbox.com/s/f8cy5fqa4zm3k ... 5.png?dl=0

Can you show me how/where you insert your link that gets stripped?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply