How to Ignore Page Sections Using XPath in InternalLinking
Use these steps to exclude sections like headers, footers, or sidebars from an internal link report using XPath.
Open the page in Google Chrome:
Right-click the section of your page that you want to ignore (e.g., header, footer) and select ‘Inspect’ on the menu that appears:
In Developer Tools (which opens once you click ‘Inspect’ as detailed above), right-click the element that you wish to exclude from your InternalLinking report when it is highlighted. This indicates that you have selected the right section.
Select Copy > Copy Full XPath:
Click on ‘+ Advanced options’ in your report settings:
Paste the copied XPath into the text box that appears, and click on the plus icon to the right of the text box:
Be sure to click the green ‘+’ icon. Otherwise, the XPath exclusion will not be considered when the report runs.
Once you have added the XPath and clicked on the plus icon, the XPath exclusion will be added to the report:
You can repeat this process for as many page sections as you wish:
Click on the ‘Create’ button and the report will generate, with the XPaths excluded:
Identify the Section to Exclude
Open the page in Google Chrome:
Right-click the section of your page that you want to ignore (e.g., header, footer) and select ‘Inspect’ on the menu that appears:
Copy the Full XPath
In Developer Tools (which opens once you click ‘Inspect’ as detailed above), right-click the element that you wish to exclude from your InternalLinking report when it is highlighted. This indicates that you have selected the right section.
Select Copy > Copy Full XPath:
Add XPath to Exclusion List in InternalLinking
Click on ‘+ Advanced options’ in your report settings:
Paste the copied XPath into the text box that appears, and click on the plus icon to the right of the text box:
Be sure to click the green ‘+’ icon. Otherwise, the XPath exclusion will not be considered when the report runs.
Once you have added the XPath and clicked on the plus icon, the XPath exclusion will be added to the report:
You can repeat this process for as many page sections as you wish:
Click on the ‘Create’ button and the report will generate, with the XPaths excluded:
Updated on: 05/11/2024
Thank you!