> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta Media Crawler अवरुद्ध (Instagram / Threads)

> robots.txt या bot नियमों द्वारा Meta के media crawler को अवरुद्ध करने से उत्पन्न error code 440 (और संबंधित Instagram 138 / Threads 379) को कैसे ठीक करें।

Error code **440** (और संबंधित Instagram code **138** / Threads code **379**) तब लौटाया जाता है जब Meta का publishing crawler आपके media URL को डाउनलोड नहीं कर सकता — सबसे आम कारण है कि आपके सर्वर पर `robots.txt` या एक bot-blocking नियम crawler को अस्वीकार कर रहा है।

<Note>
  यह पेज उन विफलताओं को कवर करता है जिनके error message या details में उल्लेख है कि सोशल नेटवर्क media को डाउनलोड नहीं कर सका, आमतौर पर `facebookexternalhit`, `robots.txt`, `"Restricted by robots.txt"`, `"HTTP error code 403"`, या Meta error `2207052` का संदर्भ देते हुए। Instagram code 138 पर aspect-ratio या format त्रुटियों के लिए, इसके बजाय [Instagram Media Guidelines](/media-guidelines/instagram) या [Threads Media Guidelines](/media-guidelines/threads) देखें।
</Note>

## लक्षण

जब crawler अवरुद्ध होता है, तो आपको ऐसी त्रुटियाँ दिखाई देंगी:

```json Error 440 (primary) theme={"system"}
{
  "status": "error",
  "errors": [{
    "action": "post",
    "code": 440,
    "message": "The social network could not download media from this URL (for example Instagram/Meta error 2207052). Ensure the file is publicly reachable by the platform's crawlers (e.g. facebookexternalhit), via media bucket's robots.txt file, not only in a browser.",
    "details": "Media download has failed.: The media could not be fetched from the provided URI...",
    "platform": "instagram",
    "status": "error"
  }],
  "postIds": [],
  "id": "..."
}
```

```json Instagram Error 138 (fallback — less specific upstream response) theme={"system"}
{
  "status": "error",
  "errors": [{
    "retryAvailable": true,
    "status": "error",
    "code": 138,
    "details": "Media download has failed.: The media could not be fetched from the provided URI. Video download failed with: HTTP error code 403. Restricted by robots.txt",
    "action": "post",
    "platform": "instagram",
    "message": "Instagram Error: Instagram cannot process your post at this time. Please try your post again."
  }],
  "postIds": [],
  "id": "..."
}
```

```json Threads Error 379 theme={"system"}
{
  "status": "error",
  "errors": [{
    "status": "error",
    "code": 379,
    "message": "Error posting to Threads.",
    "action": "post",
    "platform": "threads"
  }],
  "postIds": [],
  "id": "..."
}
```

<Note>
  Code **440** इस विफलता के लिए समर्पित Ayrshare code है और इसका message स्पष्ट रूप से `facebookexternalhit` और `robots.txt` का नाम लेता है — यदि आप 440 देखते हैं, तो आप सही पेज पर हैं। Code **138** उसी मूल कारण के लिए उत्सर्जित किया जाता है जब upstream response कम विशिष्ट होती है; 138 का उपयोग aspect-ratio / format मुद्दों के लिए भी किया जाता है, इसलिए media-fetch variant `details` में `"Restricted by robots.txt"` या `"HTTP error code 403"` द्वारा पहचाना जा सकता है। Code **379** में `details` फ़ील्ड शामिल नहीं है — यदि Threads Instagram 440 या 138 के साथ विफल होता है, तो मूल कारण आमतौर पर वही होता है।
</Note>

## ऐसा क्यों होता है

जब आप Ayrshare के माध्यम से Instagram या Threads पर प्रकाशित करते हैं, तो Meta के servers आपके द्वारा प्रदान किए गए URL से आपका media प्राप्त करते हैं। यह server-side fetch `facebookexternalhit` User-Agent का उपयोग करती है। यदि आपके सर्वर का `robots.txt` इस crawler को अनुमति नहीं देता — या एक WAF/bot-protection नियम इसे अवरुद्ध करता है — तो Meta फ़ाइल को डाउनलोड नहीं कर सकता और publish विफल हो जाती है।

Facebook Page publishing एक अलग ingestion path का उपयोग करता है, यही कारण है कि वही `mediaUrl` Facebook के लिए काम कर सकता है लेकिन Instagram और Threads के लिए विफल हो सकता है।

## समाधान: अपना robots.txt अपडेट करें

### अनुशंसित: Meta को स्पष्ट रूप से अनुमति दें, अन्य को खुला रखें

अपनी `robots.txt` फ़ाइल में ये नियम जोड़ें:

```txt robots.txt theme={"system"}
User-agent: facebookexternalhit
Allow: /

User-agent: *
Allow: /
```

यह स्पष्ट रूप से Meta के crawler को अनुमति देता है जबकि आपकी साइट को अन्य crawlers (Google, Bing, आदि) के लिए खुला रखता है।

### उन्नत: केवल social publishers तक सीमित करें

यदि आप अधिकांश crawlers को अवरुद्ध करना चाहते हैं लेकिन सोशल मीडिया प्लेटफ़ॉर्म को अनुमति देना चाहते हैं:

```txt robots.txt theme={"system"}
User-agent: facebookexternalhit
Allow: /

User-agent: Twitterbot
Allow: /

User-agent: LinkedInBot
Allow: /

User-agent: Pinterest
Allow: /

User-agent: *
Disallow: /
```

<Warning>
  एक ही `User-agent: *` block का उपयोग करें, जिसे फ़ाइल के अंत में रखा जाए। RFC 9309-अनुरूप crawlers कई wildcard groups को एक में मर्ज कर देते हैं, लेकिन जंगल में हर parser RFC-अनुरूप नहीं है — डुप्लिकेट wildcard groups नियमों के छूटने या असंगत रूप से लागू होने का एक सामान्य स्रोत हैं।
</Warning>

## सत्यापित करें कि Meta आपके URL को प्राप्त कर सकता है

अपनी पोस्ट को पुनः प्रयास करने से पहले, सत्यापित करें कि Meta का crawler अब आपके media तक पहुँच सकता है। इस कमांड को चलाएँ, `$URL` को अपने पूर्ण media URL से बदलें:

```bash theme={"system"}
curl -v --compressed -H "Range: bytes=0-524288" -H "Connection: close" \
  -A "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" \
  "$URL"
```

<ul class="custom-bullets">
  <li>**स्वस्थ response:** body में binary data के साथ HTTP 200 या 206।</li>
  <li>**अवरुद्ध response:** HTTP 403 या एक खाली/HTML error पेज।</li>
</ul>

<Note>
  Meta के दस्तावेज़ के अनुसार, `robots.txt` परिवर्तनों को Meta के crawler cache के माध्यम से प्रचारित होने में 24 घंटे तक लग सकते हैं। यदि सत्यापन सफल होता है लेकिन आपकी पोस्ट अभी भी विफल होती है, तो प्रतीक्षा करें और बाद में पुनः प्रयास करें।
</Note>

## यदि यह इसे ठीक नहीं करता है

यदि आपने `robots.txt` अपडेट किया है और `curl` कमांड से सत्यापित किया है लेकिन फिर भी विफलताएँ देख रहे हैं:

<ul class="custom-bullets">
  <li>**24-घंटे का प्रसार विलंब** — Meta `robots.txt` को cache करता है। परिवर्तन करने के बाद पुनः प्रयास करने से पहले 24 घंटे तक प्रतीक्षा करें।</li>
  <li>**WAF या bot-fight नियम** — Cloudflare Bot Fight Mode, AWS WAF managed bot rule groups, और समान सेवाएँ Meta के crawler IP ranges को अवरुद्ध कर सकती हैं भले ही `robots.txt` इसे अनुमति दे। अपने WAF logs की जाँच करें और `facebookexternalhit` के लिए एक अपवाद जोड़ें।</li>
  <li>**Hotlink protection / Referer जाँच** — कुछ CDN data-center IPs से या बिना वैध `Referer` header के अनुरोधों को अवरुद्ध करते हैं। Meta के crawler को whitelist करें या media paths के लिए hotlink protection अक्षम करें।</li>
  <li>**Signed-URL / presigned-URL समाप्ति** — यदि आपके media URL में एक expiration timestamp है (S3 presigned URLs के साथ सामान्य), तो सुनिश्चित करें कि यह Meta के crawler द्वारा फ़ेच करने से पहले समाप्त न हो। scheduled पोस्ट के लिए, ऐसे URL जनरेट करें जो scheduled समय के बाद भी लंबे समय तक मान्य रहें।</li>
  <li>**Managed media hosting** — यदि आप Cloudinary, Imgix, या समान सेवा का उपयोग करते हैं जहाँ आप `robots.txt` संपादित नहीं कर सकते, तो Meta/Facebook crawler allow-list setting के लिए उनके दस्तावेज़ की जाँच करें।</li>
</ul>

यदि इनमें से कोई भी समस्या का समाधान नहीं करता है, तो [Ayrshare support से संपर्क करें](https://www.ayrshare.com/contact) और शामिल करें:

* error response से विफल `postId`
* ऊपर दिए गए `curl` सत्यापन कमांड का output
* आपकी `robots.txt` सामग्री

## विफल पोस्ट का पुनः प्रयास करें

एक बार जब आप crawler access समस्या का समाधान कर लेते हैं, तो [Retry Post endpoint](/apis/post/retry-post) का उपयोग करके अपनी विफल पोस्ट का पुनः प्रयास करें।

## यह भी देखें

<ul class="custom-bullets">
  <li>[Instagram API](/apis/post/social-networks/instagram)</li>
  <li>[Threads API](/apis/post/social-networks/threads)</li>
  <li>[Instagram Media Guidelines](/media-guidelines/instagram)</li>
  <li>[Threads Media Guidelines](/media-guidelines/threads)</li>
  <li>[Ayrshare Error Codes](/errors/errors-ayrshare#media-fetch--crawler-access-errors)</li>
  <li>[Video Publishing Fails](/help-center/technical-support/video_publishing_fails)</li>
</ul>
