---
title: Linking pages and files
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

## Creating permanent links to pages

If you need to create a permanent link to a page, use a URL in the following format:

```text

<domain>/getdoc/<page GUID>/<page name><extension>
```

- **** is the globally unique identifier of the page. You can find a page's GUID value in **Pages -> Properties -> General -> Node GUID**.
- The **** value may contain any text — it is not used by the system, but allows you to specify the exact URL (e.g. for the purposes of search engine optimization). By default, the system uses the page's name.

Permanent links keep working even if you move the target page to another location.

For example:

_http://www.example.com/getdoc/016fad52-0d69-46d5-80dc-daec9173c0c7/Products.aspx_

is the permanent equivalent of:

_http://www.example.com/company/products.aspx_

## Linking specific language versions of pages

If you need to link to a specific [language version](https://docs.kentico.com/k10/multilingual-websites/editing-the-content-of-multilingual-websites.md) of a page, you use a URL in the following format:

```text

<domain>/getdoc/<page GUID>/<page name>/<culture code><extension>
```

For example:

_http://www.example.com/getdoc/8FG7-84E394-FABD-5678/our-services/fr-fr.aspx_

Displays the given page in French (if the page is translated). It is an equivalent of:

_http://www.example.com/company/our-services.aspx?lang=fr-fr_

## Linking attachments

If you need to create a permanent link to a file uploaded as a page attachment, you use a URL in the following format:

```text

<domain>/getattachment/<file GUID>/<filename><extension>
```

- The **** is not the same as the page GUID. It is the GUID of the file in the _CMS\_Attachment_ database table. To find the GUID of an attachment, click the attachment in **Pages -> Properties -> Attachments** and view the URL.
- The **** value can contain any text.

For example:

_http://www.example.com/getattachment/763c8921-be94-4610-99b4-25e8d3be5b08/logo.aspx_

## Parameterizing file retrieval

The system uses a handler whenever you use /getdoc, /getattachment or a direct URL based on the alias path of a CMS.File page.

You can use the following query string parameters to parametrize GetFile URLs:

| Parameter name   | Description                                                                                                                                                                                                                          | Sample value               |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| guid             | Attachment GUID value.                                                                                                                                                                                                               |                            |
| nodeguid         | Node GUID value.                                                                                                                                                                                                                     |                            |
| versionhistoryid | Version history ID of the attachment. It can only be used together with the **guid** parameter.                                                                                                                                      |                            |
| width            | Resizes the image to a specified width (in pixels).                                                                                                                                                                                  | 100                        |
| height           | Resizes the image to a specified height (in pixels).                                                                                                                                                                                 | 400                        |
| maxsidesize      | Resizes the image to the specified size of the longest side (in pixels).                                                                                                                                                             | 500                        |
| disposition      | Indicates the output disposition of the file.<br>You can use one of the following disposition values:<br>**inline** - opens the file in the browser window if possible<br>**attachment** - opens the browser's "Save or Open" dialog | inline<br>or<br>attachment |

> **Note:** **Resizing images**
>
> If your website has the **Resize images according to device profile** setting enabled in **Settings -> Content -> Content management**, the system may override the **width**, **height** and **maxsidesize** parameters used in GetFile URLs of image files. When a user views the website on a device that matches a [device profile](https://docs.kentico.com/k10/developing-websites/developing-websites-for-mobile-devices/creating-device-profiles.md), images automatically _reduce_ their maximum side size to the larger of the dimensions set for the given profile.
>
> To configure the dimensions of device profiles:
>
> 1. Open the **Device profiles** application.
> 2. Edit () a profile.
> 3. Set the **Preview width** and **Preview height** properties.
> 4. Click **Save**.
>
> If you wish to disable device profile resizing for an image, add the **resizemode=1** parameter to the GetFile URL.
