Redirect Retired Product URLs in SuiteCommerce

Set up a 301 redirect in NetSuite so an old SuiteCommerce product address opens the current product page, then import more redirects from a CSV file that has no domain column.

The quick answer

Go to Commerce > Hosting > Redirects and click New. Pick the store's Domain Name, enter the old address as a relative, descriptive path in Redirect From URL (for example /vented-hard-hat, without the domain), enter the destination in Redirect To URL, and save. NetSuite answers the old address with a permanent (301) redirect, and it works as soon as the record is saved. For many addresses, click Import on the same list and load a CSV file. If the file has no domain column, give Domain Name a default value for every row in the field mapping.

The screenshots show sample data. Person and company names are fictional. Use your own domain and addresses when following the steps.

Before you start

In this example, Larkspur Industrial Supply runs its web store, Larkspur Supply, on shop.larkspursupply.example. The HH-400 Vented Hard Hat got a new URL Component, hh-400-vented-hard-hat, so its product page moved to /hh-400-vented-hard-hat. The old address, /vented-hard-hat, is still in bookmarks, emails, and search results. Three more product addresses from the old site have the same problem. The web store manager uses the Administrator role.

The domain on a redirect has to be a shopping domain set up for the website under Commerce > Hosting > Domains. If the site's primary web site URL is a different domain, create redirects for that domain. Redirects and the Redirect import need the web site features enabled and a role with website setup permission, such as Administrator. The recording shows the store pages without a browser address bar, so the steps name each address in the text.

01. Check the old and new addresses

On the web store, open the HH-400 Vented Hard Hat product page. Its address is /hh-400-vented-hard-hat.

The product page at its new address, /hh-400-vented-hard-hat.

Now visit the old address, /vented-hard-hat. The store shows Page not found: "Sorry, we could not load the content you requested."

Before: the old address, /vented-hard-hat, shows Page not found.

That page is what a shopper sees. It doesn't tell you which status code the server sent. To check precisely, look at the response in the browser's developer tools.

02. Open the Redirects list

In NetSuite, go to Commerce > Hosting > Redirects.

Commerce > Hosting > Redirects.

The list has no redirects yet: No records to show, Total: 0. It has buttons for New and Import, and an Update Redirects button above the list.

No redirects yet. Click New.

03. Create a redirect for the old address

Click New and fill in the three values:

  • Domain Name: shop.larkspursupply.example, the domain that receives the old address.
  • Redirect From URL: /vented-hard-hat, the old address as a relative path, without the domain. Use a descriptive path like this one; older parameter-style addresses aren't supported as a redirect source.
  • Redirect To URL: /hh-400-vented-hard-hat. This can be a relative path on the same domain or a full URL, including one on another site. It has to be different from Redirect From URL.
Domain, old path, and new path.

Click Save. The redirect opens in view mode with the three values. Inactive turns a redirect off later without deleting it.

Saved. The redirect works as soon as it's saved.

04. Test the redirect

Visit /vented-hard-hat on the store again. This time the store opens the HH-400 Vented Hard Hat product page instead of Page not found.

/vented-hard-hat now opens the HH-400 Vented Hard Hat page.

Test the old addresses exactly the way people use them, including spelling and capitalization. If a variant doesn't redirect on your site, add a separate redirect for it. A Redirect From URL that ends in * also catches that path with query-string parameters and passes them on to the destination. It isn't a way to redirect one descriptive path to another.

05. Prepare the CSV file

The other three addresses are in retired-urls.csv. It has two columns, Old URL and New URL, and three rows: /tape-measure-25-ft to /tm-25-tape-measure, /clear-safety-glasses to /sg-10-safety-glasses, and /extension-cord-reel-50-ft to /ec-50-extension-cord-reel. There's no domain column.

Two columns, three rows, and no domain column.

06. Upload the file in the Redirect import

Go back to Commerce > Hosting > Redirects and click Import. The Import Assistant opens on Scan and Upload CSV File: Redirect, with Record Type Redirect. It has two steps: upload the file, then map and run. Click Select..., choose retired-urls.csv, and click Next. The Redirect Template File link on this step shows the columns NetSuite expects.

Step 1: Record Type Redirect, with retired-urls.csv selected.

07. Map the columns and set the domain

On View Mapping / Start Import: Redirect, click Old URL under Your Fields, then Redirect From URL under NetSuite Fields. A warning says that when you map Redirect From URL, you must map all required fields. Domain Name is required and the file has nothing for it. Click OK. A Domain Name (Req) row is added to the mapping.

The required-fields warning. Click OK.

Click New URL, then Redirect To URL. Then click the pencil on the Domain Name (Req) row. In Default Value, keep Provide Default Value selected, choose shop.larkspursupply.example, and click OK. Every row in the file gets that domain.

Give Domain Name the same default value for every row.

The mapping now has three rows: Old URL to Redirect From URL, shop.larkspursupply.example to Domain Name (Req), and New URL to Redirect To URL. Click Run.

All three required fields are mapped. The domain row uses the default value.

The import matches existing redirects on Domain Name plus Redirect From URL. A row that matches updates that redirect's destination. Any other row creates a new redirect.

08. Check the import job

The Redirect import runs as a background job. Job Status lists Redirect - retired-urls.csv as Pending. Click Refresh. The job is Complete, with the message "3 of 3 records imported successfully". If rows fail, the CSV Response link lists them.

Complete: 3 of 3 records imported successfully.

09. Check the list and test an imported address

Go to Commerce > Hosting > Redirects. The list shows Total: 4: the redirect you created by hand plus the three from the file, all on shop.larkspursupply.example.

Total: 4. The three imported redirects are under the one made by hand.

Visit /extension-cord-reel-50-ft on the store. It opens the EC-50 50 ft Extension Cord Reel product page.

The imported redirect works: /extension-cord-reel-50-ft opens the EC-50 page.

Check the result

  1. /vented-hard-hat opens the HH-400 Vented Hard Hat product page instead of Page not found.
  2. Job Status shows the Redirect - retired-urls.csv job Complete with 3 of 3 records imported successfully.
  3. The Redirects list shows Total: 4, all on shop.larkspursupply.example.
  4. /extension-cord-reel-50-ft opens the EC-50 50 ft Extension Cord Reel product page.

When a redirect doesn't work

Check the domain first. If the site's primary web site URL is a different domain from the one on the redirect, create the redirect for that domain. Then check that the old path matches exactly what people type, including capitalization, and that the redirect isn't marked Inactive.

A redirect applies to a matching request even if a page still exists at the old address. NetSuite doesn't create a redirect when you change an item's URL Component, so add one whenever the old address is still in links, bookmarks, or search results, not only when you launch a site.

Update Redirects on the list moves redirects from one domain to another in one step, for example after a domain change. It doesn't publish or refresh anything. To delete redirects in bulk, use a mass update.

Common questions

Where are redirects in NetSuite?

Under Commerce > Hosting > Redirects. The list shows each redirect's Domain, Redirect From URL, and Redirect To URL. New creates one redirect, and Import opens the Import Assistant for the Redirect record type.

I changed an item's URL Component and the old link shows Page not found. How do I fix it?

Create a redirect from the old path to the new one. In this example, Redirect From URL is /vented-hard-hat and Redirect To URL is /hh-400-vented-hard-hat, on the store's domain. It works as soon as you save it, and NetSuite answers the old address with a permanent (301) redirect.

How do I redirect old product URLs after moving my website to SuiteCommerce?

Create a redirect for each old product path that people or search engines still use, pointing to the matching SuiteCommerce product page. Use the domain that receives the old address and enter each source as a relative path. For more than a few, import them from a CSV file.

How do I import redirects from a CSV file into NetSuite?

Go to Commerce > Hosting > Redirects and click Import. Upload the file, map its columns to Redirect From URL, Redirect To URL, and Domain Name, and click Run. The job runs in the background, so check Job Status and click Refresh until it says Complete.

Why does the redirect import say I must map all required fields?

Domain Name is required on every redirect. When you map Redirect From URL and nothing is mapped to Domain Name yet, NetSuite warns you. Click OK, and it adds a Domain Name (Req) row for you to fill in.

How do I set the domain for every row when my file has no domain column?

Click the pencil on the Domain Name (Req) row in the mapping step. In Default Value, keep Provide Default Value selected, pick the domain, and click OK. Every row in the file gets that domain.

Does the Redirect From URL include the domain?

No. Enter only the relative path, like /vented-hard-hat. The domain goes in Domain Name.

Can a NetSuite redirect point to another website?

Yes. Redirect To URL can be a full URL on another site, as well as a relative path on the same domain. It just can't be the same as Redirect From URL.

My redirect doesn't work. What should I check?

Start with the domain. If the site's primary web site URL is a different domain, create the redirect for that one. Then check that the old path matches exactly what people type, including capitalization, and that the redirect isn't Inactive. Test by typing the old address straight into the browser.

What does the Update Redirects button do?

It moves redirects from one domain to another in one step, for example after a domain change. It doesn't create redirects, change their paths, or publish anything.