I have set the shipping origin country as Afghanistan in the Stores-->Settings-->Configuration-->Sales-->Shipping Settings->Origin, but the checkout shows "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.
The origin address:
- Country: Afghanistan
- Region/State: Kabul
- ZIP/Postal Code: 1007
- City:Kabul
- Street Address: Old Taimani, Street no 3
The destination address: The shipping.log file under /var/log/ also shows that DHL methods and rates are returned for Afghanistan as shipping origin, it is just that they are not shown on the frontend in the checkout page.
The contents of the shipping.log file
[2021-02-17 06:48:30] main.DEBUG: array (
'request' => '<?xml version="1.0" encoding="UTF-8"?>
<req:DCTRequest xmlns:req="http://www.dhl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="2.0" xsi:schemaLocation="http://www.dhl.com DCT-req_global-2.0.xsd"><GetQuote xmlns=""><Request><ServiceHeader><MessageTime>2021-02-17T06:48:29+00:00</MessageTime><MessageReference>MAGE_QUOT_602cbc3d7a42c094065827</MessageReference><SiteID>****</SiteID><Password>****</Password></ServiceHeader><MetaData><SoftwareName>Magento</SoftwareName><SoftwareVersion>2.4.1</SoftwareVersion></MetaData></Request><From><CountryCode>AF</CountryCode><Postalcode>1007</Postalcode><City>Kabul</City></From><BkgDetails><PaymentCountryCode>AF</PaymentCountryCode><Date>2021-02-17</Date><ReadyTime>PT0H00M</ReadyTime><DimensionUnit>CM</DimensionUnit><WeightUnit>KG</WeightUnit><Pieces xmlns=""><Piece xmlns=""><PieceID>1</PieceID><Weight>10.000</Weight></Piece></Pieces><PaymentAccountNumber>966852567</PaymentAccountNumber><IsDutiable>Y</IsDutiable></BkgDetails><To><CountryCode>IN</CountryCode><Postalcode>122102</Postalcode><City>Gurugram</City></To><Dutiable><DeclaredCurrency>USD</DeclaredCurrency><DeclaredValue>100.00</DeclaredValue></Dutiable></GetQuote></req:DCTRequest>
',
'response' => '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<res:DCTResponse xmlns:res="http://www.dhl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-Response.xsd">
<GetQuoteResponse>
<Response>
<ServiceHeader>
<MessageTime>2021-02-17T06:48:30.433+00:00</MessageTime>
<MessageReference>MAGE_QUOT_602cbc3d7a42c094065827</MessageReference>
<SiteID>****</SiteID>
</ServiceHeader>
</Response>
<BkgDetails>
<QtdShp>
<OriginServiceArea>
<FacilityCode>ACO</FacilityCode>
<ServiceAreaCode>KBL</ServiceAreaCode>
</OriginServiceArea>
<DestinationServiceArea>
<FacilityCode>GUR</FacilityCode>
<ServiceAreaCode>DEL</ServiceAreaCode>
</DestinationServiceArea>
<GlobalProductCode>P</GlobalProductCode>
<LocalProductCode>P</LocalProductCode>
<ProductShortName>EXPRESS WORLDWIDE</ProductShortName>
<LocalProductName>EXPRESS WORLDWIDE NONDOC</LocalProductName>
<NetworkTypeCode>TD</NetworkTypeCode>
<POfferedCustAgreement>N</POfferedCustAgreement>
<TransInd>Y</TransInd>
<PickupDate>2021-02-17</PickupDate>
<PickupCutoffTime>PT11H</PickupCutoffTime>
<BookingTime>PT11H</BookingTime>
<ExchangeRate>0.000</ExchangeRate>
<WeightCharge>0</WeightCharge>
<WeightChargeTax>0.000</WeightChargeTax>
<TotalTransitDays>8</TotalTransitDays>
<PickupPostalLocAddDays>0</PickupPostalLocAddDays>
<DeliveryPostalLocAddDays>0</DeliveryPostalLocAddDays>
<PickupNonDHLCourierCode> </PickupNonDHLCourierCode>
<DeliveryNonDHLCourierCode> </DeliveryNonDHLCourierCode>
<DeliveryDate>
<DeliveryType>QDDC</DeliveryType>
<DlvyDateTime>2021-02-25 11:59:00</DlvyDateTime>
<DeliveryDateTimeOffset>+00:00</DeliveryDateTimeOffset>
</DeliveryDate>
<DeliveryTime>PT23H59M</DeliveryTime>
<DimensionalWeight>0.000</DimensionalWeight>
<WeightUnit>LB</WeightUnit>
<PickupDayOfWeekNum>3</PickupDayOfWeekNum>
<DestinationDayOfWeekNum>4</DestinationDayOfWeekNum>
<QuotedWeight>22.000</QuotedWeight>
<QuotedWeightUOM>LB</QuotedWeightUOM>
<PricingDate>2021-02-17</PricingDate>
<ShippingCharge>0.000</ShippingCharge>
<TotalTaxAmount>0.000</TotalTaxAmount>
<QtdSInAdCur>
<CurrencyRoleTypeCode>BILLC</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<QtdSInAdCur>
<CurrencyCode>EUR</CurrencyCode>
<CurrencyRoleTypeCode>PULCL</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<QtdSInAdCur>
<CurrencyCode>EUR</CurrencyCode>
<CurrencyRoleTypeCode>BASEC</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<PickupWindowEarliestTime>00:00:00</PickupWindowEarliestTime>
<PickupWindowLatestTime>11:00:00</PickupWindowLatestTime>
<BookingCutoffOffset>PT0S</BookingCutoffOffset>
</QtdShp>
<QtdShp>
<OriginServiceArea>
<FacilityCode>ACO</FacilityCode>
<ServiceAreaCode>KBL</ServiceAreaCode>
</OriginServiceArea>
<DestinationServiceArea>
<FacilityCode>GUR</FacilityCode>
<ServiceAreaCode>DEL</ServiceAreaCode>
</DestinationServiceArea>
<GlobalProductCode>8</GlobalProductCode>
<LocalProductCode>8</LocalProductCode>
<ProductShortName>EXPRESS EASY</ProductShortName>
<LocalProductName>EXPRESS EASY NONDOC</LocalProductName>
<NetworkTypeCode>TD</NetworkTypeCode>
<POfferedCustAgreement>Y</POfferedCustAgreement>
<TransInd>N</TransInd>
<PickupDate>2021-02-17</PickupDate>
<PickupCutoffTime>PT11H</PickupCutoffTime>
<BookingTime>PT11H</BookingTime>
<ExchangeRate>0.000</ExchangeRate>
<WeightCharge>0</WeightCharge>
<WeightChargeTax>0.000</WeightChargeTax>
<TotalTransitDays>8</TotalTransitDays>
<PickupPostalLocAddDays>0</PickupPostalLocAddDays>
<DeliveryPostalLocAddDays>0</DeliveryPostalLocAddDays>
<PickupNonDHLCourierCode> </PickupNonDHLCourierCode>
<DeliveryNonDHLCourierCode> </DeliveryNonDHLCourierCode>
<DeliveryDate>
<DeliveryType>QDDC</DeliveryType>
<DlvyDateTime>2021-02-25 11:59:00</DlvyDateTime>
<DeliveryDateTimeOffset>+00:00</DeliveryDateTimeOffset>
</DeliveryDate>
<DeliveryTime>PT23H59M</DeliveryTime>
<DimensionalWeight>0.000</DimensionalWeight>
<WeightUnit>LB</WeightUnit>
<PickupDayOfWeekNum>3</PickupDayOfWeekNum>
<DestinationDayOfWeekNum>4</DestinationDayOfWeekNum>
<QuotedWeight>22.000</QuotedWeight>
<QuotedWeightUOM>LB</QuotedWeightUOM>
<PricingDate>2021-02-17</PricingDate>
<ShippingCharge>0.000</ShippingCharge>
<TotalTaxAmount>0.000</TotalTaxAmount>
<QtdSInAdCur>
<CurrencyRoleTypeCode>BILLC</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<QtdSInAdCur>
<CurrencyCode>EUR</CurrencyCode>
<CurrencyRoleTypeCode>PULCL</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<QtdSInAdCur>
<CurrencyCode>EUR</CurrencyCode>
<CurrencyRoleTypeCode>BASEC</CurrencyRoleTypeCode>
<WeightCharge>0</WeightCharge>
<TotalAmount>0.000</TotalAmount>
<TotalTaxAmount>0.000</TotalTaxAmount>
<WeightChargeTax>0.000</WeightChargeTax>
</QtdSInAdCur>
<PickupWindowEarliestTime>00:00:00</PickupWindowEarliestTime>
<PickupWindowLatestTime>11:00:00</PickupWindowLatestTime>
<BookingCutoffOffset>PT0S</BookingCutoffOffset>
</QtdShp>
</BkgDetails>
<Srvs>
<Srv>
<GlobalProductCode>P</GlobalProductCode>
<MrkSrv>
<LocalProductCode>P</LocalProductCode>
<ProductShortName>EXPRESS WORLDWIDE</ProductShortName>
<LocalProductName>EXPRESS WORLDWIDE NONDOC</LocalProductName>
<ProductDesc>EXPRESS WORLDWIDE NONDOC</ProductDesc>
<NetworkTypeCode>TD</NetworkTypeCode>
<POfferedCustAgreement>N</POfferedCustAgreement>
<TransInd>Y</TransInd>
<LocalProductCtryCd>AF</LocalProductCtryCd>
<GlobalServiceType>P</GlobalServiceType>
<LocalServiceName>EXPRESS WORLDWIDE NONDOC</LocalServiceName>
</MrkSrv>
</Srv>
<Srv>
<GlobalProductCode>8</GlobalProductCode>
<MrkSrv>
<LocalProductCode>8</LocalProductCode>
<ProductShortName>EXPRESS EASY</ProductShortName>
<LocalProductName>EXPRESS EASY NONDOC</LocalProductName>
<ProductDesc>EXPRESS EASY NONDOC</ProductDesc>
<NetworkTypeCode>TD</NetworkTypeCode>
<POfferedCustAgreement>Y</POfferedCustAgreement>
<TransInd>N</TransInd>
<LocalProductCtryCd>AF</LocalProductCtryCd>
<GlobalServiceType>8</GlobalServiceType>
<LocalServiceName>EXPRESS EASY NONDOC</LocalServiceName>
</MrkSrv>
</Srv>
</Srvs>
<Note>
<ActionStatus>Success</ActionStatus>
</Note>
</GetQuoteResponse></res:DCTResponse>
<!-- ServiceInvocationId:20210217064830_108e_dbde2ddf-e4a3-4530-ab1e-9bc605b7da6e -->
',
'from_cache' => false,
) [] []
.
.
.
DHL
shipping in Magento? Is offline Shipping? Check allowed countries for that specific Shipping Method. If Online, maybe You have to manage configuration in DHL account? BTW in screenshot, there is INDIA choosed as country, not Afganistan. Additionally, please check Your configuration for website / store scopes in admin