how do I find all external links in a confluence space

Is there a quick way to get a list of all external links in a space? By external I mean a link from Confluence to another web page outside of Confluence.

4 answers

2 accepted

1 vote

You can run this query against your Confluence database to find all of the external links:

SELECT s.spacename as Space, c.title as Page, l.destspacekey as SpaceOrProtocol, l.destpagetitle as Destination
FROM LINKS l
JOIN CONTENT c ON c.contentid = l.contentid
JOIN SPACES s ON s.spaceid = c.spaceid
WHERE c.prevver IS NULL and l.destspacekey in ('http','https')
ORDER BY l.destspacekey;

To filter for a particular space, add a where clause to filter based on the s.spacename column. 

If you go to Tools->Page Information on a particular page, you get a list of incoming and outgoing links. You should be able to see external links listed there also.

Thanks. That's a start. I was hoping for a programmatic solution so I didn't have to look at every page.

In that case you would need to create a script that goes through the content of each page looking for links. I do know that external links have a CSS class applied to them called ".external-link". You can just search the content of a page for anything that has that class and that should give you a list of external links.

Hi Juliana,
I'm having the same problem now.

Do you have found a way to get a report of all pages with the information to external links?

Cheers
Stephan

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

852 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you