Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Troubleshooting
Admin redirect search returns no results
Admin redirect search returns no results
Published on 7/24/2024
Last update on 11/8/2024

When the number of redirects is too high, the Redirects page in the Admin can't process the search. This results in no returned results when the search is run. For more details on the Redirects page, see Managing URL redirects by binding.

Solution

Follow these steps to get the redirects:

  1. Access GraphQL IDE through the page {account_name}.myvtex.com/admin/graphql-ide. Replace {account_name} with the name of your VTEX account.
  2. Select the vtex.rewriter@x app, where x is the app version. For example: vtex.rewriter@1.62.0.
  3. Use the following GraphQL query to list the store's redirects:
query {
  redirect{
    listRedirects{
      routes{
        from
        to
        endDate
        type
        binding
      }
    }
  }
}

The expected result will be displayed in the following format:

{
  "data": {
    "redirect": {
      "listRedirects": {
        "routes": [
          {
            "from": "/hello",
            "to": "hola",
            "endDate": null,
            "type": "PERMANENT",
            "binding": "56bc9434-7b8a-4ab1-a693-36271595a27d"
          },
          {
            "from": "/v/*",
            "to": "https://masrefacciones.backend.verbolia.com",
            "endDate": null,
            "type": "PERMANENT",
            "binding": "56bc9434-7b8a-4ab1-a693-36271595a27d"
          }
        ]
      }
    }
  }
}
  1. Alternatively, if the redirect path you want to find is known, use the following GraphQL query replacing /hello with the path of the desired redirect:
query {
  redirect{
    get(path:"/hello"){
      from
      to
      endDate
      type
      binding
    }
  }
}

The expected result will be displayed in the following format:

{
  "data": {
    "redirect": {
      "get": {
        "from": "/hello",
        "to": "hola",
        "endDate": null,
        "type": "PERMANENT",
        "binding": "56bc9434-7b8a-4ab1-a693-36271595a27d"
      }
    }
  }
}

If the current redirects are not what's expected, the Rewriter app allows you to perform other operations with redirects, such as deleting existing ones and creating new ones. For details on these operations, see the Rewriter GraphQL API guide.

You can also export and import redirects with .csv files using the Redirects page or the VTEX IO CLI redirects plugin. For details on importing and exporting redirects, see Managing URL redirects by binding and the VTEX IO CLI command reference.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback