{"id":18366,"date":"2026-09-29T21:06:30","date_gmt":"2026-09-29T18:06:30","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/cpanel-redirects-301-302\/"},"modified":"2026-11-22T13:55:37","modified_gmt":"2026-11-22T10:55:37","password":"","slug":"cpanel-redirects-301-302","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-redirects-301-302\/","title":{"rendered":"Redirect a Page or Domain in cPanel: 301 vs 302 and the www Options"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>In short<\/b>In <b>Redirects<\/b> choose the type <b>Permanent (301)<\/b>, the domain, type the old page path, then the full new address in <b>Redirects to<\/b>, and click <b>Add<\/b>. Use 301 for permanent moves so the page keeps its Google ranking.<\/div>\n<div class=\"hy-vid\"><div style=\"width: 1280px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-18366-1\" width=\"1280\" height=\"720\" poster=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-redirects-en.jpg\" preload=\"none\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-redirects-en.mp4?_=1\" \/><a href=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-redirects-en.mp4\">https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-cpanel-redirects-en.mp4<\/a><\/video><\/div><\/div>\n<p>You changed a page address, moved your site to a new domain or merged two pages. Without a redirect, visitors coming from Google or an old link land on a 404 error. A redirect takes them to the new place automatically.<\/p>\n<h2>301 or 302?<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Meaning<\/th>\n<th>When to use it<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Permanent (301)<\/td>\n<td>The page has moved for good<\/td>\n<td>Address changes, domain moves, merged pages. Passes the page value in search engines<\/td>\n<\/tr>\n<tr>\n<td>Temporary (302)<\/td>\n<td>The page is elsewhere for now<\/td>\n<td>Short maintenance or a seasonal offer, after which the original address returns<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>The steps<\/h2>\n<ol class=\"hkb-steps\">\n<li><b>Open Redirects<\/b> in the Domains section of cPanel.<\/li>\n<li><b>Choose the type<\/b> Permanent (301) in most cases.<\/li>\n<li><b>Choose the domain<\/b> or All Public Domains to apply it to all of them.<\/li>\n<li><b>Type the path after the slash<\/b> such as <code>old-page<\/code>. Leave it empty to redirect the whole domain.<\/li>\n<li><b>Enter the full new address<\/b> in Redirects to, starting with https:\/\/.<\/li>\n<li><b>Choose a www option and click Add<\/b> the redirect appears in the list below.<\/li>\n<\/ol>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hkb-fd-en-m-redirect.webp\" alt=\"The Add Redirect form in cPanel\" width=\"800\" height=\"451\" loading=\"lazy\" \/><\/figure>\n<h2>The www and wild card options<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Option<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Only redirect with www.<\/td>\n<td>Works when the domain is typed with www<\/td>\n<\/tr>\n<tr>\n<td>Redirect with or without www.<\/td>\n<td>Works both ways; usually the right choice<\/td>\n<\/tr>\n<tr>\n<td>Do Not Redirect www.<\/td>\n<td>Works only without www<\/td>\n<\/tr>\n<tr>\n<td>Wild Card Redirect<\/td>\n<td>For a whole domain move: <code>old.com\/any-page<\/code> goes to <code>new.com\/same-page<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Examples<\/h2>\n<ul class=\"hkb-list\">\n<li><b>One page:<\/b> path <code>offers-2025<\/code> \u2192 <code>https:\/\/yourdomain.com\/offers<\/code>.<\/li>\n<li><b>A whole domain:<\/b> empty path, with wild card \u2192 <code>https:\/\/your-new-domain.com<\/code>.<\/li>\n<\/ul>\n<div class=\"hkb-note warn\"><b>On WordPress:<\/b> this tool writes the redirect into <code>.htaccess<\/code>, while plugins such as Rank Math manage their own redirects. Keep your redirects in one place so they do not clash, and never redirect a page to itself, which causes a too many redirects error.<\/div>\n<p>To send all visitors from http to https you do not need this tool: turn on Force HTTPS Redirect on the Domains page.<\/p>\n<h2>Frequently asked questions<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>How long until the redirect works?<\/summary>\n<p>Immediately, but your browser may remember an old redirect, so test in a private window.<\/p>\n<\/details>\n<details>\n<summary>Does a 301 redirect hurt my Google ranking?<\/summary>\n<p>No, it is the proper way to pass the old page&#8217;s value to the new one.<\/p>\n<\/details>\n<details>\n<summary>How do I delete a redirect?<\/summary>\n<p>In the list at the bottom of the Redirects page, click Delete next to it.<\/p>\n<\/details>\n<details>\n<summary>I get Too many redirects. Why?<\/summary>\n<p>Usually a redirect loop, or a clash with a plugin or the HTTPS setting in Cloudflare.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/add-multiple-domains-one-hosting\/\">Add More Than One Domain to One Hosting Account in cPanel: A Separate Site per Domain<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/fix-cgi-sys-defaultwebpage-cgi\/\">How to Fix the cgi-sys\/defaultwebpage.cgi Page After Moving Your Site<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cloudflare-errors-fix\/\">Common Cloudflare Errors and How to Fix Them: 520, 521, 522, 525 and Too Many Redirects<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/create-subdomain-cpanel\/\">Create a Subdomain in cPanel, Such as blog.yourdomain.com<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cpanel-domains-software-section\/\">The Domains and Software Sections in cPanel: Domains, HTTPS Redirect, Zone Editor and PHP Version<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/\">All cPanel guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In shortIn Redirects choose the type Permanent (301), the domain, type the old page path, then the full new address in Redirects to, and click Add. Use 301 for permanent moves so the page keeps its Google ranking. You changed a page address, moved your site to a new domain or merged two pages. Without [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":20821,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2749],"doc_tag":[],"class_list":["post-18366","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-website-control-panel-cpanel"],"year_month":"2026-11","word_count":498,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"ahmed fathy","author_nicename":"ahmed-fathy","author_url":"https:\/\/www.hyyat.com\/en\/author\/ahmed-fathy\/"},"doc_category_info":[{"term_name":"cPanel Guides","term_url":"https:\/\/www.hyyat.com\/en\/kb\/website-control-panel-cpanel\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=18366"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18366\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/20821"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=18366"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=18366"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=18366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}