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.

6 answers

2 accepted

3 votes
Accepted answer

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

0 votes
Accepted answer

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.

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;

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

 

For example if external site url to search is https://demo.site.com/..... . This worked in confluence for me : 

http*demo*site*com*

 

Regards,

Ankit

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

886 views 45 7
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