# Relative URLs/paths with no leading slash

**URL:** <https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [February 25, 2021, 10:13pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550 "2021-02-25T22:13:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![krzyszto9](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@krzyszto9](https://discuss.elastic.co/u/krzyszto9)\
**Post date:** [February 25, 2021, 10:13pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/1 "2021-02-25T22:13:45Z")

</div>

Hello everyone!  
Some websites like [http://www.gilacountyaz.gov/government/assessor/index.php](http://www.gilacountyaz.gov/government/assessor/index.php) have a bunch of internal links that should be absolute paths, but do not have the leading slash.

This causes a web crawler to generate wrong links. Instead of

[https://www.gilacountyaz.gov/government/assessor/late\_breaking\_news.php](https://www.gilacountyaz.gov/government/assessor/late_breaking_news.php)

web crawler creates

[https://www.gilacountyaz.gov/government/assessor/government/assessor/late\_breaking\_news.php](https://www.gilacountyaz.gov/government/assessor/government/assessor/late_breaking_news.php)

This can potentially create infinite loop and a lot of 404 errors.

Web browsers like Firefox or Chrome can handle this, because there is `<base>` tag present on the website.

```auto

    <head>
      <base href="http://www.gilacountyaz.gov/index.php"/>
    </head>

```

It allows browser to interpret these links correctly, but webcrawler is ignoring it. Is there any quick workaround that will make webcrawler work correctly?

---

<div class="post-metadata">

**Author:** ![Rich\_Kuzsma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rich_kuzsma/32/66159_2.png) [@Rich\_Kuzsma](https://discuss.elastic.co/u/Rich_Kuzsma)\
**Post date:** [February 25, 2021, 10:40pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/2 "2021-02-25T22:40:44Z")

</div>

It looks like a bug in the web crawler beta release. I don't see a workaround, but I let the Elastic engineering team know about it. Thanks for reporting this!

---

<div class="post-metadata">

**Author:** ![oleksiy-elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksiy-elastic/32/49074_2.png) [@oleksiy-elastic](https://discuss.elastic.co/u/oleksiy-elastic)\
**Post date:** [February 28, 2021, 7:13pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/3 "2021-02-28T19:13:19Z")

</div>

Thank you very much for reporting this! I don't think there is a way to work around the problem since we simply don't support the base tag at the moment. We have added it to the roadmap and will make sure it is supported before GA.

---

<div class="post-metadata">

**Author:** ![krzyszto9](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@krzyszto9](https://discuss.elastic.co/u/krzyszto9)\
**Post date:** [February 28, 2021, 8:56pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/4 "2021-02-28T20:56:18Z")

</div>

@oleksiy-elastic @Rich_Kuzsma Thank you very much for your help!

---

<div class="post-metadata">

**Author:** ![oleksiy-elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksiy-elastic/32/49074_2.png) [@oleksiy-elastic](https://discuss.elastic.co/u/oleksiy-elastic)\
**Post date:** [March 5, 2021, 2:10pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/5 "2021-03-05T14:10:50Z")

</div>

Just wanted closing the loop here: The feature has been implemented and should be available in the next minor release of the solution (7.13).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2021, 2:11pm UTC](https://discuss.elastic.co/t/relative-urls-paths-with-no-leading-slash/265550/6 "2021-04-02T14:11:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
