<p>You could make a plugin that generates a short URL using a link-shortener API (e.g. <a href="http://dev.bitly.com/code_libraries.html" rel="nofollow">dev.bitly</a>) for each of your entries and provides the URL as a custom read-only Field Type.</p>

CC BY-SA 3.0
2015-02-21T08:10:12.920Z
Hi carlcs, thank you for your answer. They want to keep their domain name rather than use a service. So all that's required is changing `example.com/some/long/url/structure` to `example.com/some` short. I should have made that clear in the question sorry.
Gareth
CC BY-SA 3.0
2015-02-21T08:16:11.757Z
Yah, in this case your plugin is probably the best solution, @Gareth. If it is not enough, you could look into modifying it to (automatically) set up that routes from Edit Entry pages.
carlcs
CC BY-SA 3.0
2015-02-18T22:34:31.320Z
2015-02-18T22:34:31.320Z
carlcs
<p>I have a client that wants to create a short URL to an entry for a mail shot. What would be the best way to do this. I have the <a href="http://viget.com/extend/reroute-plugin-for-craft" rel="nofollow">Reroute plugin</a> installed which would work (setting to a 302 redirect) but I am wondering if that is the best approach. </p>

<url>
Whats the best way to create short URL's
# Whats the best way to create short URL's

(Asked by: username_0 on 2015-02-18)

I have a client that wants to create a short URL to an entry for a mail shot. What would be the best way to do this. I have the [Reroute plugin](http://viget.com/extend/reroute-plugin-for-craft) installed which would work (setting to a 302 redirect) but I am wondering if that is the best approach.

**Tags:** url


---

## 1 answers

### Answer by username_1 on 2015-02-18. Score: 1 | Accepted answer

You could make a plugin that generates a short URL using a link-shortener API (e.g. [dev.bitly](http://dev.bitly.com/code_libraries.html)) for each of your entries and provides the URL as a custom read-only Field Type.

> **Comments:**
> **username_0**: Hi username_1, thank you for your answer. They want to keep their domain name rather than use a service. So all that's required is changing `example.com/some/long/url/structure` to `example.com/some` short. I should have made that clear in the question sorry.  
> **username_1**: Yah, in this case your plugin is probably the best solution, @username_0. If it is not enough, you could look into modifying it to (automatically) set up that routes from Edit Entry pages.  

---

