Change URL (slug)

ps_change_url

Write · preview + approveBlock 1 · Content & SEODaily connector

Changes a page address and makes sure the old address redirects to the new one.

Ask Claude

„Change the URL of product 45 from solar-lamp-x to solar-garden-lamp-x and make sure the old one redirects.”

Example preview

Product 45, language en.
Old: /garden-lighting/45-solar-lamp-x.html
New: /garden-lighting/45-solar-garden-lamp-x.html
Canonical redirect: 301. Old URL will redirect 301 to the new one.
After saving: check of the old URL.

Technical details

Changes the friendly URL (slug, link_rewrite) of a product, category, CMS page, blog post or blog category in one language. The preview shows the old and new URL, URLs changed as a side effect (for example products of a category whose name is in the product URL) and whether the old URL will redirect with 301. The change is BLOCKED when the store redirects with 302 instead of 301, developer mode is on, or a module overrides routes. After execution the tool requests the old URL itself, expects a 301 to the new one and reports the result.

Parameters

NameTypeRequiredDescription
object_typeenum: product | category | cms | blog_post | blog_categoryyesObject type.
object_idintegernoObject ID (for a product you can use product instead).
productstringnoProduct as a person refers to it: id:123, ref:ABC-1, ean:5901234123457, a product URL from the store, a bare ID (1-7 digits), an EAN (8/12/13 digits) or a reference. Instead of object_id for object_type=product.
new_slugstringyesNew slug: lowercase letters without diacritics, digits and hyphens (e.g. black-kids-sandals). Max 128; SmartBlog post max 45.
langstringwhen: shop has more than one active languageISO code of the language you write in. Required when the shop has more than one active language. Claude writes the content in this language.
shop_idintegernoShop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info.
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

One object and one language per call. Blocked on 302 canonical redirect, developer mode or route-overriding modules. Not undone by ps_revert_change: undo with another ps_change_url.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Last updated: 2026-10-03