We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [redirects]

A page, link or command that points URL requests to another URL in the world wide web. Redirects can be either server-side or client-side through the use of javascript.

Filter by
Sorted by
Tagged with
2
votes
0answers
35 views
+50

Why do my analytics report that index.php appears in URLs despite friendly URL rewrite rules?

On a website i use mod_rewrite and PHP to create clean URL's. My .htaccess (summary) will look like that shown below: RewriteEngine On #oude pagina's RewriteRule ^nl/links/(.*)/index.php$ /...
0
votes
0answers
8 views

Redirecting affiliate link: is it okay to add nofollow and noreferrer only to the affiliate link and not the pretty link?

I run a Wordpress website and normally use the plugin Thirsty Affiliates to redirect/cloak my affiliate links with a prettier link. Wordpress adds the noreferrer and noopener attributes to the pretty ...
1
vote
1answer
37 views

Use .htaccess to redirect to add .txt extension

I have a .txt file on my hosting and would like to redirect to it if somebody enters an specific website within their browser, e.g. example.com/webpage --> redirects to --> example.com/...
3
votes
1answer
37 views

What is the Cloudflare equivalent of these two .htaccess redirect rules?

I usually set up my sites to rewrite URLs in the following cases: All http traffic is redirected to https (and www), with a 301 All non-www traffic is redirected to www (and https), with a 301 In ....
0
votes
1answer
62 views

How to mask redirect with Google Domains

For some reason, Google Domains does not have a mask feature. Is it possible to do this using custom resource records or synthetic records?
1
vote
1answer
12 views

See Google Analytics tracking stats from short cross domain redirect URL used in print media

I am using a different domain for some ads to track how many people access the main site through this domain. How can I see this in Google Analytics? I have DOMAIN A (on the ad) redirecting to ...
1
vote
1answer
33 views

Using htaccess to redirect 301 for domain change

I am currently moving a domain from one to the other, this is not an HTTPS move but rather a move from exampleone.co.uk to exampletwo.co.uk. I am using this code: <IfModule mod_rewrite.c> ...
2
votes
1answer
55 views

.htaccess, redirect all to bye.php, even with more slashes, with exception

I need, in .htaccess, redirect all behind domain, but even with more slashes and with slash or no slash at the end, but with one exception. For example example.com/all/sites/should/redirect/to/one/...
2
votes
1answer
26 views

Redirect hundreds of subdomains to the main domain with path forwarding, use .htaccess?

I want to redirect from a subdomain to domain along with URL path forwarding. Example: abc.example.com/products.html TO another.example/products.html The trailing URL should be preserved. We ...
1
vote
3answers
6k views

How to decrease HTTPs redirect wait time?

I use a wordpress plugin to redirect my website to HTTPs however I have noticed a redirect time of 500 ms Which takes the time to first byte to 800 ms. How can I reduce the redirect time?
5
votes
4answers
2k views

Should I redirect “ugly” URL to friendly URL?

I use mod_rewrite to rewrite https://example.com/?page=some-page&tab=2 to https://example.com/articles/some-page/2. But people can still access both URLs. I want to know: should I redirect the "...
3
votes
2answers
32 views

Redirect root domain to path

Searched all questions by redirect keyword (e.g. 1, 2) but none of them fit my case. I want to redirect my domain (www.example.com) to another (sub-)domain including path and query if possible: www....
2
votes
2answers
109 views

301 redirects for asp pages to html

So I've redesigned a site that was built comprising of solely .asp pages and redid it using .html pages. I deleted the old site and uploaded the new, and uploaded my .htaccess file with code along the ...
0
votes
0answers
17 views

Wordpress with Ecommerce Software on Subdomain

I've just finished building a wordpress site for the company I work for. The original plan was to build out the store with woocommerce. However we have over 11,000 products and orders need to work ...
2
votes
1answer
2k views

How to stop other domains to 301 redirect to my website domain?

I found that someone is 301 redirecting his website domain to my website domain. fakedomain.com -> 301 redirects -> correctdomain.com Using the contact information found by whois query, I already ...
2
votes
3answers
137 views

Using htaccess to force HTTPS doesn't work

NEW EDIT 28/oct/19 → I edited the .htaccess file as you said AddHandler x-mapp-php5.5 .php # HTTP to HTTPS redirect RewriteCond %{SERVER_PORT} 80 RewriteRule (.*) https://www.bebechan.net/$1 [R=301,...
2
votes
0answers
27 views

Google search console reports indexing my pages with pagination parameters even though they redirect

I recently saw in search console that Google is indexing some of my WordPress posts with pagination. For example example.com/post/page/2. The coverage report says "indexed but not submitted." It ...
2
votes
3answers
8k views

Site hosted with 1and1 redirects to defaultsite

I purchased Linux hosting from 1and1.com. I added a domain registered elsewhere as an external domain to my 1and1.com account. I changed the DNS settings. I set up a home page for my site. When I ...
0
votes
1answer
117 views

Redirecting a domain works on HTTP but not on HTTPS with IIS server

We built a site for a client to advertise a new block of apartments they had built. The apartments have now all been sold so we have been asked to forward the domain to another domain until there is ...
1
vote
1answer
39 views

htaccess redirect based on referrer URL string

I have a 3rd party who POST's to a specific page on my website. They post a file and my site does some wizardry with the contents of that file. The request URL would be for example https://example....
3
votes
3answers
899 views

Fastest way to redirect dead URLs to home page

A client of mine scrapped his entire wordpress site of many years for a custom CMS. The URL structures both use the /<post_title> format, so a pattern based .htaccess rule is out of the picture ...
1
vote
1answer
29 views

Do redirects affect google analytics?

I have a website that redirects in the following manner: https://example.com/drugs/paracetamol.html http://example.com/drugs/new-paracetamol.html - 302 https://example.com/drugs/new-paracetamol.html -...
2
votes
2answers
290 views

When changing domain names, can I keep my existing SEO and Google Search ranking?

Suppose I have been using a domain, say www.bollywoodhatke.com for 3 years, and it has a good Alexa (hypothetical situation). It has backlinks and its has 7,000 pages indexed and 50,000 images indexed,...
3
votes
1answer
73 views

How do I redirect a subdomain with a wildcard?

I've an old subdomain that was being used as a whitelabel. I'd like to redirect the subdomain to a page on my main domain. I was thinking the best way would be a htaccess redirect. RewriteCond %{...
3
votes
0answers
32 views

Redirected to www, but Google is indexing no-www without snippets, should I use noindex instead?

I started my blog a month ago and was using non www version for my website. Then, I recently decided to stick to www.example.com version. So I changed it and Google has indexed the www version ...
1
vote
1answer
11 views

.htaccess HTTPS fowarding still redirecting to a folder which I have removed from the rule

I have the following simple code in my .htaccess file in order to forward my domain to the HTTPS version of the website: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://...
0
votes
1answer
44 views

Redirecting URL with & without query string?

If I setup a 301 redirect for the first URL path below will that also redirect all the paths below that contain a query string? For example: /6-light-oval-chandelier-espresso?pp=0&epik=...
7
votes
2answers
15k views

What causes “redirect notice” in Google search?

Occasionally, I get "Redirect Notice" pages when I click on some Google search results. My website does have a landing page redirect, but no redirect notice shows up when I click on it in Google ...
1
vote
1answer
811 views

.htaccess file to implement multiple redirects

I have a dynamic site and from .htaccess file creating clean URLs: RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.gif|\.jpeg|\.bmp)$ RewriteRule ^([a-zA-Z0-9_\-\+\ ]+)$ flight.php?flights=$1&slug=$1 ...
2
votes
1answer
23 views

wordpress multisite htaccess redirect site to TWO subsites

EDITED: I've split a website into two subsites in a multisite enviroment. The old site was moved to a subsite, and renamed old.mysite.example. This will be faced out at some point. During ...
2
votes
1answer
120 views

How can I redirect a Blogger blog to another blog

I have a blogger blog with its own domain (I'll call it www.example.com); that's to say: this site used to be a www.example.blogspot.com and I purchased a name domain later; I can continue to manage ...
0
votes
0answers
30 views

Finding URLs that redirect to a given website

Is there any way to find all URLs that (permanently) redirect to a given website? E.g. www.ubercab.com redirects to www.uber.com. So I'd want a way to determine that www.ubercab.com redirects without ...
3
votes
1answer
997 views

Avoid 301 redirect in cdn.domain.mx

I have a domain with a .htaccess redirection problem. The active CDN the URL should be: cdn.domain.mx/images/test.png but redirects: cdn.domain.mx/images/something.png -> www.domain.mx/images/...
3
votes
1answer
45 views

htaccess conflicts

The issue that I'm currently forced to handle is related to a folder structure URL being redirected to the same folder structure URL but with a different string. So page-a used to exist but that ...
1
vote
1answer
65 views

Google Search Console: URL is not on Google (page with redirect)

I have just created a personal website which I host as github page and recently hooked it up with a custom domain. (In this post I changed the actual URLs to webmasters-example.com and webmasters-...
3
votes
3answers
2k views

How to remove /index.html

How to make redirect /index.html -> / in Apache? Redirect /index.html http://domain-name.com/ Is causeing infinite loop when opening home page.
1
vote
3answers
3k views

301 redirect from “/index.html” to root if index.html not exist

Can I create 301 redirect from "index.html" to root directory if file "index.html" not exist? For example: link "http://example.com/index.html" show "404 Error" page. I need 301 redirect to root ...
1
vote
0answers
131 views

After almost 6 months, why google is still indexing my old site?

I purchased a domain steakovercooked.com to replace the domain zhihua-lai.com in Jan 2016. I do a 301 redirect in zhihua-lai.com/.htacess RewriteEngine on RewriteCond %{HTTP_HOST} ^zhihua-lai.com ...
1
vote
1answer
69 views

After website migration a year ago, some URLs from the old domain are still in Google. Should I block the old domain now?

I had an old domain which was migrated to a new domain. However, for a few pages redirects are not working properly and still being indexed in results. The migration was done a year ago. Would it ...
1
vote
1answer
173 views

When I search for a 301 redirected domain Google shows a message from GoDaddy rather than following the 301 redirect

I have a domain name registered at Godaddy. I also have a website that I created at Google Sites. I forward the URL to go to the Google Site. I did this using the Godaddy Domain Manager Forwarding ...
4
votes
1answer
33 views

Reorder parts of URL path to put date together using .htaccess redirects

old permalink: https://www.example.com/2019/cat/subcat/10/25/post-name/amp/ new permalink: https://www.example.com/2019/10/25/cat/subcat/post-name/amp/ How can I redirectmatch the old format to ...
2
votes
2answers
2k views

Remove everything after the question mark in the URL?

Is there any way to redirect a page with a question mark in the URL, to the same page, but with everything after the question mark removed? For example: From: /residential-properties/projectname/?...
11
votes
4answers
3k views

Can the files robots.txt and sitemap.xml be dynamic through an .htaccess redirect?

I have a multilanguage and multidomain site. It runs through a unique CMS installation (Drupal), so I have a single root directory. So if I have a static robots.txt, there I only can show the files ...
2
votes
1answer
89 views

After redirecting to `www` is it problematic if my sitemap XML has non-www URLs?

I'm confused about canonical issue. I've setup in .htaccess to redirect the URLs without www to www. Now the URLs in this link in http://www.example.com/sitemap are all without www. Is this going to ...
3
votes
1answer
219 views

Redirect 301 for Apache Sub directory and query string combination

I am getting 404 errors in Google Search Console for URLs like the following: http://www.example.com/newsite12121212121212/eg/st_tour/perma/ http://www.example.com/newsite12121212121212/eg/...
0
votes
0answers
17 views

m.me links not working chrome mobile

I just got into a problem when links to messenger (m.me/PageNumber) are not working on mobile chrome. It works fine on desktop chrome, it redirects straight to messenger.com/PageNumber. But on ...
2
votes
1answer
31 views

How to rewrite using .htacess when there is a ? (question mark) at the beginning of the URL?

Many JS functions on my site are sending Ajax request to /?something=3213214 but I need to redirect them to /something=3213214 When I do: RewriteRule ^test/(.*) /$1 [R] It does redirect /test/...
6
votes
2answers
390 views

I changed my domain name. How to keep my ranking and traffic?

Two weeks ago I changed my Blogger domain name from "energieshow.blogspot.com" to "lifeskills-coach.com". It works and redirects perfectly. But since I was afraid of losing my ranking and traffic in ...
0
votes
0answers
5 views

Redirect sub.domain.com/folder1/ to sub.domain.com/folder1/folder2/

I'm trying to redirect sub.domain.com/folder1/ to sub.domain.com/folder1/folder2/ but I don't know-how. I've tried so for this but without success. RewriteEngine On #If the host is "sub.domain.com" ...
11
votes
6answers
8k views

Forcing SSL and www in .htaccess

I'm looking for a way to force SSL and www. I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: ...