Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how do I find all external links in a confluence space

Juliana MacAller February 18, 2016

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.

7 answers

2 accepted

4 votes
Answer accepted
Justin W_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2018

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. 

Mark de Bont [Marel]
Contributor
August 10, 2018

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

1 vote
Answer accepted
Alex Yasurek
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2016

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.

3 votes
Mark de Bont [Marel]
Contributor
August 9, 2018

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;

1 vote
easifyandroid
Contributor
January 25, 2019

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

0 votes
Lars Mählmann
Community Champion
November 12, 2020

Hi,

I have used a simple CQL query like this one:

space = 'XYZ' and text ~ 'http:' 

 For me this works well through REST API for scripting and I can spice it up some fancy search attributes ;-) 

0 votes
Stephan Herzberg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 9, 2016

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

 

0 votes
Juliana MacAller February 19, 2016

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

Alex Yasurek
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2016

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events