# Temporary, one-off URLs

**URL:** <https://talk.jekyllrb.com/t/temporary-one-off-urls/8203>\
**Category:** Help\
**Created:** [May 1, 2023, 11:45am UTC](https://talk.jekyllrb.com/t/temporary-one-off-urls/8203 "2023-05-01T11:45:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philiprhoades](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/philiprhoades/32/1755_2.png) [@philiprhoades](https://talk.jekyllrb.com/u/philiprhoades)\
**Post date:** [May 1, 2023, 11:45am UTC](https://talk.jekyllrb.com/t/temporary-one-off-urls/8203/1 "2023-05-01T11:45:40Z")

</div>

People,

I have a public Jekyll site where I would like to have some pages / directories more protected - I am thinking:

- Trying to access a particular URL causes a pop-up box to request the person’s email address

- The entered email address is checked against a list of authorised emails

- For an authorised email address request, a one-off, encrypted URL is generated and emailed to the person

How to do this? Could the encrypted URLs be symlinks to the actual URL where the symlinks would get deleted after 24 hours or something?

Thanks,

Phil.

---

<div class="post-metadata">

**Author:** ![pcouy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/pcouy/32/5307_2.png) [@pcouy](https://talk.jekyllrb.com/u/pcouy)\
**Post date:** [May 1, 2023, 2:23pm UTC](https://talk.jekyllrb.com/t/temporary-one-off-urls/8203/2 "2023-05-01T14:23:19Z")

</div>

You wouldn’t be able to do that with Jekyll, which is a static site generator. This means that once generated, your site will stay the same until next build.

Doing what you described would require server-side code to be run for the login process and for sending emails. I don’t know how experienced you are with web technologies, but if you don’t know how to use server-side code, I recommend you look at a PHP tutorial, which should be a good starting point.

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [May 22, 2023, 11:40am UTC](https://talk.jekyllrb.com/t/temporary-one-off-urls/8203/3 "2023-05-22T11:40:24Z")

</div>

A fully static option might be to encrypt the secret portions of a page, and use Javascript’s Web Crypto API to decrypt based on a password provided by the user. Web Crypto info:

> **[Web Crypto API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)**
>
> The Web Crypto API is an interface allowing a script to use cryptographic primitives in order to build systems using cryptography.

---

<div class="post-metadata">

**Author:** ![philiprhoades](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/philiprhoades/32/1755_2.png) [@philiprhoades](https://talk.jekyllrb.com/u/philiprhoades)\
**Post date:** [May 25, 2023, 3:30pm UTC](https://talk.jekyllrb.com/t/temporary-one-off-urls/8203/4 "2023-05-25T15:30:20Z")

</div>

Chuck,

> [@chuckhoupt](#):
>
> A fully static option might be to encrypt the secret portions of a page, and use Javascript’s Web Crypto API to decrypt based on a password provided by the user. Web Crypto info:
> 
> [Web Crypto API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)

Ah interesting! I will have a look at that . .

Thanks!

Phil.
