# Using IPFS

**IPFS** or the **InterPlanetary File System** is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. It's an amazing technology that allows people to share content and "repin" the content to strengthen the bandwith for the file.&#x20;

An IPFS document is generally accessed by knowing it's **file hash** and then using an **IPFS gateway** to load the file. For example here is a link to an IPFS share featuring the music found on the [Voyager Golden Record](https://en.wikipedia.org/wiki/Voyager_Golden_Record). The file hash for this document is QmaFP38LkSFURqmGsv1TW6ncjuftRrZP8f78RR2Dd4hCGp. By knowing the file hash you can use any IPFS gateway to access this document. For example:\
\
<https://cloudflare-ipfs.com/ipfs/QmaFP38LkSFURqmGsv1TW6ncjuftRrZP8f78RR2Dd4hCGp/>

<https://ipfs.io/ipfs/QmaFP38LkSFURqmGsv1TW6ncjuftRrZP8f78RR2Dd4hCGp/>

DWEB domains have built-in support for linking directly to IPFS files via Decentraweb's IPFS gateway. A user who has the DWEB Resolver enabled can access the above IPFS file via a normal DWEB domain. \
\
Live examples:\
\
<http://golden.record/> (if you are connected to Goerli Test Resolver)\
<http://goldenrecord.sagan/> (if you are connected to Mainnet Resolver)

![Screenshot of http://golden.record/](/files/jod5Rkykbt8WNAscCZEO)

{% hint style="info" %}
Replace all instances of [https://dns.decentraweb.org/](https://dns-rinkeby.decentraweb.org/) with <https://dns-goerli.decentraweb.org/> if you'd like to do the steps in Testnet!
{% endhint %}

## How to link a DWEB domain to an IPFS document

1. Before you start you should know the **IPFS Hash** of the document you want to link to. You can use a service like [https://pinata.cloud/](https://app.pinata.cloud/) to upload a file (up to 1GB free) and get an IPFS hash.&#x20;
2. Visit [https://dns.decentraweb.org/](<https://dns-rinkeby.decentraweb.org/ >), click "Manage Name" button and click the subdomain you want to link to IPFS.
3. Decentraweb allows you to use your own Smart Contract Resolver. In most cases you should just use Decentraweb's default by clicking the "Use Decentraweb Resolver" button. This will trigger an on chain transaction.
4. Once this is complete you will see two new additions on the page for setting (IPFS) "Content" and "DNS records". Click the blue edit button on the "Content" and past in a reference to your IPFS file. For example:\
   \
   ipfs\://bafybeifq6kpf3zybrk4dhhmeg7xc2kjlw2l4mhgfjkmmhaj4uszwf7hfse
5. Save your changes and within 1-minute CONGRATS you should be able to see your IPFS file via your DWEB subdomain. If it doesn't display, ensure you are running the DWEB Resolver.

<figure><img src="/files/LC286D7neLJzllN1rYcL" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decentraweb.org/decentraweb/learn/using-decentraweb-domains/using-ipfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
