Picture of Customisable Access Denied and Content Unavailable Pages

Customisable Access Denied and Content Unavailable Pages

Two gaps in how the storefront handles inaccessible content have been closed. Previously, a visitor without permission to view a category saw a blank page, and an unpublished product or category silently redirected to the homepage. Both dead ends with no explanation.

Tutorial Video Transcript

0:00 When a visitor lands on something they are not allowed to see, what happens next matters. Until now, Infigo storefronts handled two of those cases silently: a category restricted by access permissions served a completely blank page, and an unpublished product, category or blog post quietly bounced the visitor back to the homepage.
0:19 Both now show a proper page that explains itself. The access denied page is controlled from your admin panel — go to Configuration, then Settings, then Access Permission Settings, tick Access Permission Enabled, and save.
0:35 That switch is only half of it. The page appears when your permission setup also refuses that particular visitor, and deciding who can see what is a subject in its own right, covered in depth in the Infigo Academy.
0:47 From that point on, the difference is down to the customer. A customer whose role is allowed to see a product opens it exactly as before.
0:55 A customer whose role is not allowed to see that same product gets a clear Access Denied page, instead of an empty screen or a silent bounce to the homepage.
1:04 Categories behave the same way. Unpublished content needs no setup at all — unpublish a product, a category or a blog post, and anyone who visits it sees a friendly message saying the content is not available, along with a button to take them back to your homepage.
1:21 Two of these pages arrive with default wording that is yours to change, and both sit in the same place. Open Editable Content in the admin panel and go to the General group.
1:31 Access Permission Denied Page Content is what a refused visitor sees, and 404 Error Page Content is what sits behind a dead link.
1:39 Open either one, rewrite the message in your own tone of voice, save, and it goes live straight away. The not-available page for unpublished items is the exception, with no block of its own.
1:51 Behind the scenes, links to products, categories or blog posts that no longer exist now correctly return a not-found response, which is better for visitors' browsers and better for how search engines index your storefront.
2:03 The wording on that page is the second of the two blocks you just saw. Full written steps are in the Academy article linked below.

Incomplete

Customisable Access Denied and Content Unavailable Pages

Summary

Visitors who reach content they cannot view see a customisable page within the storefront. Two pages cover the two cases: an Access Denied page for permission-restricted content, and a "This content is not available" page for unpublished products, categories or blog posts. Requests for pages that do not exist at all now correctly return a not-found response. Two of these pages have their own block in the Editable Content admin area, so you can reword them: "Access Permission Denied Page Content" and "404 Error Page Content".


Problem

Previously, a visitor without permission to view a category (with access permissions enabled) was shown a completely blank page with no explanation. Separately, visiting an unpublished product, category or blog post silently redirected the visitor to the homepage with no message. Neither case gave the visitor any useful feedback, and non-existent pages did not reliably return a proper not-found response for browsers or search engines.


Environment

Applies to all storefronts automatically. The Access Denied page is relevant to storefronts that use Access Permission Settings to restrict category or product visibility; the "This content is not available" page applies to any storefront that unpublishes products, categories or blog posts.

What has to be true for each page to appear

  • Access Denied page: Access Permission must be switched on for the storefront, AND your permission setup must refuse that particular visitor. A visitor is refused either because a rule denies them, or because "Default is Allowed" is off and no rule grants them access.

  • Access Denied page and guests: with "Deny Guest Accounts" on, visitors who are not signed in are refused too, so the Access Denied page is what an anonymous visitor sees on restricted content.

  • Access Denied page scope: it covers the storefront web pages for categories and products (including those reached through rules that target tags). API responses were deliberately left as they were and still return their own error shapes.

  • "This content is not available" page: no configuration, no permissions involvement. It is driven only by the Published tick box, and it shows for every visitor. This includes a signed-in customer with full access.

  • Not-found: an item that does not exist, because it was deleted or the link is wrong, returns a 404 instead. If you would rather a visitor saw "not available" than a 404, unpublish the item rather than deleting it.

  • Admin access: the Access Permission Settings page needs the "Manage settings" permission on your admin role. If you cannot see the page, ask Infigo Customer Support to enable that permission for the roles that need it.

Configuration


Step 1: Find the two error page content blocks in Editable Content

Go to Content Management > Editable Content and open the "1. General" group. Two blocks in that group hold the wording for the pages in this article, and both should be available already, filled in with default wording, so there is nothing to create: "Access Permission Denied Page Content", used when a visitor is refused access, and "404 Error Page Content", used when a link points at something that no longer exists. Both are visible in the list below.

step1_editable_content_list.jpg

Step 2: Edit the wording and save

Click Edit against whichever block you want to change, rewrite the message in your own words, then Save -- and repeat for the other block, as the two are edited one at a time from this same list. The change goes live on the storefront immediately, meaning there is no separate publish step. You may have to clear your cache to view the changes.

step2_editable_content_edit.jpg

Step 3: Switch on Access Permissions

For certain elements of this setup, Access Permissions are required to be configured on your storefront. The Infigo Academy contains many resources on Access Permissions:

step3_access_permission_settings.jpg

Step 4: Check a restricted page as a customer who is allowed in

Sign in as (or impersonate) a customer whose role is granted access to the restricted item, and open it. Nothing has changed for them: they see the product exactly as before. Check this first, so that the refusal in the next step is proof your permission setup is working rather than a sign something is broken.

step4_product_allowed.jpg

Step 5: Open the same page as a customer who is refused

Now open the very same URL as a customer whose role is not granted access. They get the Access Denied page carrying your wording and a link back to the homepage, and it is returned as a 403 so browsers and search engines treat it correctly.

step5_product_denied.jpg

Step 6: Restricted categories show the same page

Categories behave identically. A refused visitor gets the same Access Denied page, so there is nothing extra to configure for them.


Step 7: Unpublished items show "This content is not available"

Untick Published on a product, category or blog post and anyone who opens its page now gets a short "This content is not available" message with a Home Page button, rather than being redirected to the homepage with no explanation. This is the one page here with no Editable Content block of its own: nothing to switch on and nothing to edit. It appears automatically, with its standard wording, for every visitor, as soon as the item is unpublished.

step7_content_unavailable.jpg

Step 8: Links to items that no longer exist return a not-found page

Unpublished and deleted are different cases and now behave differently. A link to a product or category that has been deleted, or never existed, returns a proper 404 not-found page. That is the correct answer for a browser and it stops search engines from continuing to index dead links -- so an old URL in a customer's bookmark or an email is no longer indistinguishable from a permissions problem. To reword this page, go back to Content Management > Editable Content > "1. General" and open the second block from Step 1, "404 Error Page Content".

step8_not_found.jpg

Where to learn more

This article covers the two new pages. Setting up who is allowed to see what is a separate subject the Academy already covers in depth:

Alternate Search Terms

access denied page, content not available page, unpublished product page, editable content access permission, storefront 404 page