The Full-Page Script in Veshort is a powerful tool that allows you to easily shorten all or select URLs on your website. To implement this script, you simply need to copy and paste the code below at the end of your page. You can customize the selector as you wish to target URLs in a specific selector.
Here is an example of the basic code:
![](https://d1yc87jitvcxyn.cloudfront.net/content/-MMnej1709377431.png)
Choosing a different domain
If you want to use a different domain for your shortened URLs, you can define a custom domain name. Make sure the domain is exactly the same as the domain added in your Veshort account, including the schema (HTTP/HTTPS). Here is an example of how to define a custom domain:
![](https://d1yc87jitvcxyn.cloudfront.net/content/-xJLEp1709377431.png)
Choosing custom selectors
You can also specify custom selectors to target specific URLs. Here is an example of how to use custom selectors:
![](https://d1yc87jitvcxyn.cloudfront.net/content/-BCvzl1709377431.png)
This example will only shorten URLs that have a class named "mylink" or all direct link in the ".content" container or all links in the ".comments" container
Excluding domain names
You can also exclude specific domain names by using the exclude parameter. Here is an example of how to exclude certain domain names:
![](https://d1yc87jitvcxyn.cloudfront.net/content/-kHhcU1709377431.png)
This example will shorten all URLs except URLs from google.com or apple.com
Restricting domain names
You can also restrict domain names by adding an include parameter. Here is an example of how to restrict domain names:
![](https://d1yc87jitvcxyn.cloudfront.net/content/-hYjNi1709377431.png)
This example will shorten all URLs within the include domain name.
Please note that the key in the example is just a placeholder, you should use the key that you have been provided with in your account.
Return to the documentation click → Here