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.

5 answers

2 accepted

This widget could not be displayed.

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. 

Note: this would also find the deleted spaces in the Trashcan

This widget could not be displayed.

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.

This widget could not be displayed.

Update for Confluence 6.10

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;

This widget could not be displayed.

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.

This widget could not be displayed.

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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

324 views 2 5
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