Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
David

Link Count Counting Image CDN links as "External"

Hey guys,

I love the new “Link Count” column. Yoast recently added a link counter, but it only shows internal links. The way you’ve chosen to show both internal & external links is more helpful.

I load all my images from a CDN with a custom subdomain (i.e. cdn.mysite.com). Sometimes I link to the original media file (i.e. <a href="cdn.mysite.com/wp-content/01/2017/image.jpg"><img src... /></a>) so the user can view a larger version.

It seems as though your link counter is counting these links as external links. Technically, they are, so I totally get it. But is there any way I could exclude them from the link count? A filter, perhaps?

Any ideas or thoughts would be awesome.

Thanks,
Dave

6 years, 11 months ago
Tobias Schutter
Developer

Hi David,
That’s a good point. We could add a filter that allows you to add your own subdomains. Or perhaps we could add a filter that will allow you to validate each individual HREF as internal or external. That could be useful if your CDN domain changes a lot. I’ll give it some more thought, but you can expect a solution in the next patch!

Cheers,
Tobias

6 years, 11 months ago
David

Awesome! Thanks Tobias.

P.S. I love the work you guys are doing on this plugin. It just keeps getting better and better. I just discovered the “Images” column. You’ve implemented that so beautifully. Keep up the great work.

6 years, 11 months ago
David

I saw you guys added a filter for explicitly naming internal domains in your latest release, 4.1. I really appreciate it.

Would you mind providing a brief example of how I would go about using it? (I’m still very much a beginner with PHP)

My main website is https://wpsmackdown.com. I host my images on https://cdn.wpsmackdown.com, and when I link to them, can I exclude them from the link count? If not, can you show me how I would count these as internal and not external links?

Also, I cloak quite a few affiliate links: https://wpsmackdown.com/out/affiliate/. Is there any way to count any link starting with https://wpsmackdown.com/out/ as an external link?

Thanks for your help!
Dave

6 years, 10 months ago

You must be logged in to reply to this topic.