This article gives instructions and examples for how to set up Path Constraints and Link Exclusions for the scan.
If you plan to do the scan on a path-based domain, you need to set up path constraints because the crawler will crawl everything it can find on the domain. For more information on how to set up path constraints, contact your customer service manager.
This section gives instructions and examples on how to set up path constraints. Path constraints are regular expressions.
A Regular Expression (regex) is an API that defines string patterns. Use a regex to search, manipulate, and edit a string in Java. Email validation and passwords are two examples of strings where Regex can define the constraints.
Regular Expressions in source-code exclusions are not 100% compatible with Acquia Optimize Policies. The languages are different (Java and Ruby).
Use Path Constraints to instruct the scan to only process parts of a domain. The scan compares URLs in the site with the pattern given. URLs that match the pattern are scanned and URLs that do not match the pattern are considered external links.
A Path Constraint can be a word or a regular expression. In most cases, users set up Path Constraints to:
Restrict the scanner to only recognize parts of a site with a pattern. For example:
^/en
This instructs the scan to handle any URL that does not begin with /en (for example, http://foo(dot)com/fr/bar) as an external link. For example, the crawler tests the link but does not follow any links on http://foo(dot)com/fr/bar.
Instruct the scan to ignore parts of the site with a pattern. For example:
!^/fr
This instructs the scan to handle any URL that begin with /fr (for example, http://foo(dot)com/fr/bar) as an external link. This means that the scan tests the link but does not follow any links on http://foo(dot)com/fr/bar.
The difference between the two is that in the first case ALL pages under /en are scanned and nothing else. In the second example, all pages EXCEPT /fr are scanned.
Make sure that the URL for the domain is set to a page that matches the constraint.
If this is not done, just one page is included in the scan - since the crawler cannot proceed to any other page than the page it starts on.
For example, with a constraint of:
^/en/booking
the crawler cannot start on http://foo(dot)com. The crawler will request http://foo(dot)com, receive the page, and find that no links match http://foo(dot)com/en/booking, and therefore only the first page is scanned.
Regular Expressions in source-code exclusions are not 100% compatible with Acquia Optimize Policies. The languages are different (Java and Ruby).
Click Settings (gear icon) at the top of the Domain Overview page. The Admin Settings page opens.
The Settings button is only available to site admins.
Click Action. on the same row as the domain you want to do a scan on.
Select Edit Domain from the drop-down list.
The Edit Domain page opens.
Scroll to the Advanced Domain Options section.
Locate the Path Constraints section:
+ Add: Click + to add a new Constraint pattern. An empty row is added to the list.
The window only shows the first five items. With more than five list items, a paginate function sorts the list items.
Some CMS selections have pre-filled parameters, as per the majority of users with those CMS operators. Click Default to remove them if needed. The Default button only appears for certain operators.
For more information and examples, see the external article:
This section gives instructions and examples for how to set up the link exclusions. Link exclusions are regular expressions.
A Regular Expression (regex) is an API to define String patterns. Use a regex to search, manipulate, and edit a string in Java. Email validation and passwords are two examples of strings where Regex can define the constraints.
Regular Expressions in source-code exclusions are not 100% compatible with Acquia Optimize Policies. The languages are different (Java and Ruby).
Choose to exclude a word or a regular expression. Use Link Excludes to instruct the crawler to completely ignore a link on the pages. Pages that match the pattern are not tested.
Use link exclusions to:
Filter out print pages with a pattern such as print=true
This instructs the scan to ignore (and not test) any URL with the pattern, for example:
http:/ /foo.com/bar?print=true.
Filter out redirected login pages with a pattern such as:
login.aspx?return_url=zyx.
This instructs the scan to ignore all URLs with the pattern, for example: http://foo(dot)com/bar/login.aspx?return_url=zyx.
Tip! If "Scan subdomains" is turned on for the domain, use the § sign in front of the exclude pattern to match URLs that use the full string instead of the relative one. For example, to exclude the scan for the "blog" subdomain, enter as the pattern:
§http://blog.foo.bar
Regular Expressions in source-code exclusions are not 100% compatible with Acquia Optimize Policies. The languages are different (Java and Ruby).
Click Settings (gear icon) at the top of the Domain Overview page.
The Settings button is only available to site admins.
Click Action on the same row as the domain to scan.
Select Edit Domain from the drop-down list.
The Edit Domain page opens.
Scroll to the Advanced Domain Options section.
In the Link Excludes section:
Exclude pattern: Enter a pattern to exclude from the scan.
The window only shows the first five items. With more than five list items, a paginate function begins to sort consecutive list items.
It is possible to do a link exclusion for a link that is attached to an image. The link is then excluded from the scan. However, the image itself could still appear on the SEO and QA pages as an issue to be fixed if it does not meet other requirements (for example, missing ALT text).
For more information and examples, see the external article:
For more information, see the user guide articles:
For advanced instructions on this topic, see the associated article in the Acquia Optimize for Developers collection:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Mon Nov 04 2024 10:19:26 GMT+0000 (Coordinated Universal Time)