Preskoči na sadržaj
BeoHosting
BeoHosting

7 min

Redirects in cPanel

301, 302, wildcard and .htaccess methods.

BeoHosting Tim

10+ godina iskustva — Stručnjaci za web hosting i infrastrukturu

Poslednje ažurirano:

A redirect automatically sends a visitor from one URL to another. When someone opens the old URL the server returns the new page without any user action. Redirects are critical to preserving good UX and SEO ranking when you move pages, change domains or force HTTPS.

Redirects in cPanel

1

Open the Redirects tool

Log into cPanel and open the Redirects tool under the Domains section.

2

Pick the redirect type

Choose 301 (Permanent) for moves that pass SEO link juice. Use 302 (Temporary) for short-term redirects (campaigns, maintenance).

3

Set source and target URL

Pick the source domain, fill the relative path (e.g. /old-page) and the destination URL. Decide whether www. should also be redirected.

4

Test the redirect

Open the source URL in incognito mode. Use redirect-checker.org or curl -I to verify the 301/302 status code.

5

Set up wildcard redirects

Enable "Wildcard Redirect" to forward every page under an old path to the matching page on the new path (e.g. /blog/* → /articles/*).

6

Use .htaccess for advanced redirects

For regex or conditional rules edit .htaccess directly: RewriteEngine On + RewriteRule ^old-page$ /new-page [R=301,L].

Spremni da pokrenete svoj sajt?

SSL zaštita
Brzina
24/7 podrška

Pridružite se 4.000+ zadovoljnih korisnika. Besplatna migracija i 15 dana garancije povrata novca.

15 dana garancija povrata novca
Besplatna migracija15 dana garancija24/7 podrška

FAQ

Odgovori na najčešća pitanja o našim uslugama.

301 (Permanent Redirect) tells search engines and browsers that the page has moved permanently. Google transfers about 90-99% of SEO value (link juice) from old to new URL and eventually replaces the old URL with the new one in the index. 302 (Temporary Redirect) says the change is temporary and the old URL will be active again. Google does not pass SEO value and keeps the old URL in the index. Always use 301 for permanent changes to preserve SEO ranking.

In cPanel Redirects tool: pick type 301 (Permanent), in the Domain dropdown pick the old domain, leave the source URL empty (root), enter https://newdomain.com as destination, and tick "Wild Card Redirect". This redirects all pages from old to new domain, including subpages. Alternatively, in .htaccess: RewriteEngine On / RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC] / RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L].

301 redirects positively affect SEO because they transfer most SEO value from old to new URL. Google recommends 301 for all permanent changes. However, there is a small loss (about 1-10%) of link juice per redirect. Avoid redirect chains (A > B > C) — each hop loses value. 302 does not pass SEO value and can confuse search engines. Multiple unnecessary redirects slow the site, which negatively affects UX and ranking.

In cPanel, open the Redirects tool. At the bottom of the page you see the list of all active redirects with details (type, source, destination). Click "Delete" or the "x" icon next to the redirect you want to remove. The change is immediate. If you added the redirect manually in .htaccess, open File Manager → public_html → .htaccess and remove the relevant RewriteRule lines. Always back up the .htaccess file before changes in case something goes wrong.

Most common reasons: 1) Browser cache — clear cache (Ctrl+Shift+Delete) or test in incognito. 2) Redirect loop — check there is no circular redirect. 3) Wrong path — verify the source URL matches exactly (with or without trailing slash). 4) .htaccess conflict — other rules in .htaccess may block your redirect; check rule order. 5) CDN cache — if you use Cloudflare or another CDN, clear their cache. On BeoHosting, support can help with diagnostics.

Naše garancije za vaš mir

Zaštićeni ste sa svake strane

15 dana garancije

Vraćamo novac bez pitanja u prvih 15 dana.

Besplatna migracija

Mi prebacimo vaš sajt bez prekida — vi ništa ne radite.

24/7 podrška

Naši stručnjaci su tu 24/7 kroz tikete i live chat.