# Share links: page or file, and share codes

How hematite share links work: send them to a share page or the file itself, set your address and the share code's style, and give an image a new link.

Every upload gets a link, and you decide what it looks like in [Upload settings](https://hematite.gg/settings/upload). The link settings there apply to every new upload: from [the browser](https://hematite.gg/docs/getting-started/first-upload), [ShareX](https://hematite.gg/docs/uploaders/sharex) or [the API](https://hematite.gg/docs/developers). Changes wait in the bar at the foot of the page until you press **Save** (⌘S or CtrlS).

## Links go to a share page or the file

Under **Their link**, **Links go to** has two choices:

- **Share page:** the image's own page, with its title, who shared it, likes and comments ([what a share page shows](https://hematite.gg/docs/getting-started/your-link)). In Discord it makes a card ([how it looks](https://hematite.gg/docs/getting-started/discord)). This is where links go unless you change it.
- **Direct file:** the image file itself on hematite's CDN, for embedding anywhere a plain image link is wanted (a forum, a README, an overlay).

`https://hematite.gg/s/x7Kp2QmA` (Share page, on hematite)

A direct link names the stored file, not the share code, so it doesn't change when you change your code's style. With a [watermark](https://hematite.gg/docs/guides/watermarks) on, the file it opens carries it, as everyone else sees your picture; the watermark it was made with stays on it. While a picture is [shielded](https://hematite.gg/docs/guides/shield-and-burn), its direct link opens nothing.

## The address of a share page

With **Share page** chosen, the **Address** row sets where it lives: a domain from the menu, and where the domain allows them, a subdomain in front and a path after.

`https://nova.yourdomain.com/ranked/s/x7Kp2QmA` (Share page on a domain of your own, with a subdomain and a path)

- **Domain:** hematite's own, or a domain you added or chose from the ones others share. See [custom domains](https://hematite.gg/docs/guides/custom-domains).
- **Subdomain:** letters, digits and dashes, up to 63 characters, and not one hematite keeps (hosts such as `www` and `api`, staff words such as `admin`, payment and sign-in words, brands, offensive words). Only on domains that take subdomains.
- **Path:** one word without a slash, up to 255 characters. Only on domains that take paths.

If the domain you chose stops working, new links fall back to hematite's own address until it's back.

## The share code

The code at the end of a share link is made fresh for every upload. Under **Share code**:

| Made of           | Looks like                        |
| ----------------- | --------------------------------- |
| Alphanumeric      | `7K3pQwXm`                        |
| Letters only      | `AzKpRfQw`                        |
| Lowercase letters | `kqzbxntp`                        |
| Numbers only      | `73962841`                        |
| Hexadecimal       | `7a3fc92b`                        |
| Unambiguous       | `7Kq3RfPw`, without `0 O o 1 l I` |
| Emojis            | a row of emojis                   |
| Memorable         | words joined by dashes            |

**Length** goes from 4 to 32 characters; it starts at 8. Longer codes are harder to guess, shorter ones easier to type.

A link opens with its exact code only: `7K3pQwXm` and `7k3pqwxm` are two different links, and an emoji code opens with its own emojis and no others. A code that happens to spell a rude word is drawn again before anyone sees it.

## Give an image a new link

Open the image's settings and find its **Share link**.

- **Edit the code** right in the field, to one of your own: 4 to 64 letters, digits, `-` and `_`. It can't be:
  - a word hematite keeps, however it's written (`login`, `paypal`, `free-nitro`, `adm1n`, its own pages, brands, offensive words): the field says **That code is kept**;
  - another link's code, in any capitals (`Nova` while there's a `nova`), or one a link had in the last year: **Taken**. Changing only the capitals of your own is fine.

  You can change codes ten times an hour.

- **Make a new link** gives it a fresh code in your code's style and a new file name. Every link to it so far stops working, including links to the file, so it asks first and you hold the button to the end.

Either way, anyone who has the old link open right then is moved off it at once: their page says the link was changed by its owner, and doesn't show the new one. Your own open share page follows to the new link.

A code you give up, by changing it, making a new link or deleting the image, is kept from everyone for a year, you included: nobody can take it and have your old links, still pasted in Discord, open their picture. Codes made before these rules (shorter, or with other characters) keep working as they are.

> **Warning**
>
> A new link can't be undone: anything that pointed at the old one, a Discord
> message or a forum post, stops showing the image.

## Random file names

**Random file names**, under **New uploads**, renames each file to a random string as it's stored, so the name it had on your computer gives nothing away.
