Built myself a Python automated internal linking algorithm. Want the script? Get it below.
Been having some auto-gen content fun lately, with a maximum focus on making stuff as natural as possible.
Interlinking is now my focus for it.
Built my own interlinker last year, but well, WordPress is a pain with custom editors and I gave up.
Looping back to it now, and I have the base for Python interlinking script that will link my clusters together. Prioritise links how I want them.
It will take the Markdown formatted text, pre-Wordpress upload, and sort internal links for me.
Add keywords, get links.
Natural anchors
A few will be exact match links, but most will have natural surrounding text that forms a (mostly) coherent anchor.
Keyword: Blog
Anchors:
a blog
blog posts
bloggers
a blogging setup
this blog content
all possible blog posts
Keyword: WordPress
Anchors:
all those lovely WordPress features
WordPress
all the WordPress bloat
We're looking at 2,000-2,500 word articles, so I'll be looking at inserting 3-4 links to other articles in the cluster, and then a link to the pillar for the cluster.
Fallback link forcer
But, not all articles in the cluster will have a keyword that will get it links.
In that case, I've got a little fallback that will force a link in for any URLs that don't match a link.
Just one of those old "read more:" type setups, but this has gotta be better than nothing.
What it does now
Now, this is just the basis of it for testing. This isn't a run, get links, setup. It's the algorithm for it. The brains.
It still needs to be tweaked to dynamically list the keywords/urls, and also to actually pick which link to insert, as it's just giving you all the options right now.
I'll be having it randomly select a link, and then blocking it from selecting any other link in the nearby sentences, but you can obviously tweak this how you'd want.
Built with ChatGPT.
You can modify it with ChatGPT.
ChatGPT can even help you set python up... It helped me!
You could;
- Block exact match
- Block phrase match
- Add synonym matching
- Add multiple links per URL
The list goes on!
Want the script?
Like, repost and chuck a comment down below and I'll slide into your DMs with the script.