How to control links on database sites?

Status
Not open for further replies.

Aveligand

New member
Jun 11, 2007
207
1
0
I'm in the process of building my first database site as Eli laid out in his SEO Empire post and I had a question regarding how to lay out the outbound links.

I'm thinking a using a PHP function so that I'll be able to manipulate the anchor text and destination of every link from a central file (i.e "config.php")

<?php
define('link1', '<a href=http://www.blah.com>anchortext1</a>');
define('link2', '<a href=http://www.blahblah.com>anchortext2</a>');
?>

And then at the footer of each page, I'll just use Echo to call up link1, link2 etc.

So far, this is the best solution that I can think of to control sitewide links on a massive database site that can handle on-the-fly changes, in case you need to switch up the links in the future. But this seems like a rather crude solution and there would be no variance on the anchor text, which could hurt.

I was just curious to know what everyone here does. Any thoughts?
 


This is where I stopped working on my database site, I got too confused with the best way to set it up. I wanted a global database of all my keywords, links, pages, etc.. and I wanted contextual links, links surrounded by the targeted keywords.

If I were you I would just setup a simple db to handle it, the site/page would request the links using some site / page id and then echo them as you said.
 
one thing I would stay away from is any script/idea that calls a random link from a DB or file.

Make sure the links you put on one site/page always stay there with the same anchor text. Changing up these links/text on the same page over time will be a red flag.

The posters idea actually works out well if you have 4-5 DB sites and want to drop a link in the sidebar/footer or even body areas. For example, I have 5 DB sites... I make this one file and define 2 links for the 1st DB site like this:

Code:
<?php
define('link1a', '<a href=http://www.blah.com>anchortext1</a>');
define('link2a', '<a href=http://www.blahblah.com>anchortext2</a>');
?>
Then when I move to my 2nd DB site and I want to use the same 2 links again, I add this to the file.


Code:
<?php
 define('link1b', '<a href=http://www.blah.com>anchortext1variation</a>');
 define('link2b', '<a href=http://www.blahblah.com>anchortext2variation</a>');
 ?>
I basically define each link to a site and a variation of the anchor text. I always know any defined "link" with an "a" is always a link for DB site 1. Any defined link with a "b" is always a link on DB site 2.

What this does is easily let you define links for each DB site while changing up the anchor text per site too ( if its the same sites you are promoting across all you DB sites )

If you dropping a site wide link on all these sites, there is no need to vary up the anchor text on every page of every site. Just change it per site. If it is not a site wide link, then that is a different story and this script will not be all the useful to you.
 
If you dropping a site wide link on all these sites, there is no need to vary up the anchor text on every page of every site. Just change it per site. If it is not a site wide link, then that is a different story and this script will not be all the useful to you.


Yeah, my links will be sitewide.

How particular are you about where your database sites link to? Does it have to be niche specific (like medical site DB -> medical affiliate site, music db -> music site) or does it not matter so much?
 
Status
Not open for further replies.