Automatically create internal links?

movietub

Free Member
Nov 6, 2008
4,858
1,106
We have a approx 2500 pages of content now, but we have very little linking in between pages - other than all product pages are just 2 clicks from the home page.

Is there any quick way of editing an entire site to turn all keywords in to links? Either using software or a simple method someone else has perfected? A DW plugin maybe?

What I need to achieve is for example exchanging all insances of the word 'red' for the a hyperlink '../index/red.html' and so on.

Conext sensitive advert programmes achieve the same, it must be possible.
 

movietub

Free Member
Nov 6, 2008
4,858
1,106
It depends on how the site is put together. If it's just plain HTML then you could just do a find and replace on the source code.

If you're using a script or ecomm then you'll probably need to get something written specifically.

I know of one for Wordpress called SEO SmartLinks http://wordpress.org/extend/plugins/seo-automatic-links/

all html content, I though about using find&replace but that requires editing one document at a time per word. We could edit each document at a time but we would need to replace about 1000 different words with specific hyperlinks. Obviously not on each page, but that range of links would need to be available to cover each and every page.
 
Upvote 0

freshpurple

Free Member
Jan 29, 2009
92
14
London
Could this be done fairly easily via Javascript? (Serious question for the developers out there as we were thinking of trying to do something similar)

From my limited knowledge it seems possible to write a script that does a search and replace on each page as it it loads and replaces each instance of a list of words with the appropriate link tag.
 
Upvote 0

movietub

Free Member
Nov 6, 2008
4,858
1,106
Could this be done fairly easily via Javascript? (Serious question for the developers out there as we were thinking of trying to do something similar)

From my limited knowledge it seems possible to write a script that does a search and replace on each page as it it loads and replaces each instance of a list of words with the appropriate link tag.

I know enough to know that it could be done if the dev had complete control of the site. The raw html content would have to be processed by JS first and then projected in to the website. Unfortunately as we use a hosted solution/CMS which is not open source there would be no way to run the html content through the script.

In my case we would have to copy the html in an editor, run some sort of find and replace instruction over it and then upload it again with all the links in place. Just can't find a program which offers such dynamic find and replace functions!!
 
Upvote 0

mattsaw

Free Member
Jun 6, 2006
883
336
47
Surrey/London
all html content, I though about using find&replace but that requires editing one document at a time per word. We could edit each document at a time but we would need to replace about 1000 different words with specific hyperlinks. Obviously not on each page, but that range of links would need to be available to cover each and every page.

With Dreamweaver you can run a find and replace on the entire site rather than just a single document.
 
Upvote 0
K

Kev Jaques

If you are using a CMS then you should easily be able to add in a query block of relative posts in the page footer either related by tag/category.
Either through a control panel to let you add this in or a small amount of dev time for either a plugin or bespoke query from your host/cms provider without the need to edit hundreds of pages.
 
Upvote 0

edmondscommerce

Free Member
Nov 11, 2008
3,653
628
UK
Could this be done fairly easily via Javascript? (Serious question for the developers out there as we were thinking of trying to do something similar)

From my limited knowledge it seems possible to write a script that does a search and replace on each page as it it loads and replaces each instance of a list of words with the appropriate link tag.

possible but no SEO value

This is a pretty trivial thing to do though in any server side language like PHP (which is the most sensible way to do it).
 
Upvote 0

movietub

Free Member
Nov 6, 2008
4,858
1,106
possible but no SEO value

This is a pretty trivial thing to do though in any server side language like PHP (which is the most sensible way to do it).

Good point, if the script re-generated the html it would be removing the links from reach of google bots...

This definately has to be done offline and uploaded as plain old html. But what program has a search and replace function that is able to search for several phrases at once, and replace each one with a specific link to the right url?

Is there a piece of software we could use macros with the create a rule set for certain words?

If I could nail this we could go from a handful to 10k internal links within 24 hours!
 
Upvote 0

edmondscommerce

Free Member
Nov 11, 2008
3,653
628
UK
Good point, if the script re-generated the html it would be removing the links from reach of google bots...

This definately has to be done offline and uploaded as plain old html. But what program has a search and replace function that is able to search for several phrases at once, and replace each one with a specific link to the right url?

Is there a piece of software we could use macros with the create a rule set for certain words?

If I could nail this we could go from a handful to 10k internal links within 24 hours!


no it doesn't need to be done offline and uploaded as static HTML, though that would work, if a bit labour intensively.

just find and replace keywords with links.
 
Upvote 0

movietub

Free Member
Nov 6, 2008
4,858
1,106
no it doesn't need to be done offline and uploaded as static HTML, though that would work, if a bit labour intensively.

just find and replace keywords with links.

There are 1000 different words I want to turn in to individual links, using a normal find and replace function I would have to run it 1000 times across each page to make sure it got all the keywords in that page.

Is there a find and replace type tool that can be setup to remember a 1000 different keywords to find, and rules to apply?
 
Upvote 0

edmondscommerce

Free Member
Nov 11, 2008
3,653
628
UK
again, the best solution is a small PHP script.

it would work a bit like this:

Code:
ob_start();

//all your text gets output here

$caught = ob_get_clean();

echo linkify($caught);

function linkify($text){
  $q=mysql_query("select * from linkify");
  while($r=mysql_fetch_assoc($q)){
   $fr['%'.$r['find'].'%si']=$r['replace'];
  }
  return preg_replace(array_keys($fr), $fr, $text);
}

note thats just typed so don't hold it against me if it doesn't work




}
 
Upvote 0

Latest Articles

Join UK Business Forums for free business advice