Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
119
votes
5answers
216k views

Moving from HTTP to HTTPS in Google Search Console

I'm moving from HTTP to HTTPS for my entire site. The site is currently added to Google Search Console (formerly Google Webmaster Tools) as www.example.com and all the pages are indexed without using ...
26
votes
4answers
63k views

Is there any way to redirect one domain to another via DNS settings keeping the path information?

For example, my domain is example.com and when someone navigates to example.com/sample/page.htm, I want it to redirect to test.com/sample/page.htm. I know that this can probably easily be done using ...
17
votes
2answers
9k views

What are the Consequences for using Relative Location Headers?

According to the spec, Location headers used in a redirect require a server name HTTP/1.1 301 Moved Permanently ... Location: http://example.com/foo/baz/bar However, in 2012, most web browsers will ...
15
votes
4answers
1k views

ecommerce item deleted by user, 301 redirect to HOME PAGE or 404 not found?

I know this question is someway similar to this one where they recommend using 404, but after reading this other one where they suggest to use 301 when changing site URLs (in the specific case was due ...
15
votes
2answers
3k views

Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page?

We run an ecommerce site that was setup by a third party ecommerce software provider, basic shop with product pages, basket and checkout. The third party vendor set up the htaccess file so that if a ...
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 ...
11
votes
5answers
512 views

“Thank you for posting. Please stand by while you are redirected.” Needed?

Thank you for posting. Please stand by while you are redirected. If you are not automatically redirected, please click here. You're probably familiar with messages like these, especially ...
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: ...
11
votes
2answers
946 views

Homemade URL shortener redirect conflicting with 301 redirects

I have a website which was originally built using classic ASP. About a year ago it was rewritten in PHP. This caused file extensions to change and some pages were moved to new locations within the ...
10
votes
2answers
385 views

If I have a page that gets a lot of StumbleUpon traffic, will that traffic fall if I move it?

Say I have a page that gets a lot of traffic via StumbleUpon. It's an ancient page, and I might want to move it to another site as part reorganizing my old site. I intend to keep the content identical,...
9
votes
3answers
5k views

Are drops in Google ranking common after switching to https?

About a week ago I made the switch to https on one of my sites. I'm positive I did everything right. Properly setup 301 redirects from http to https versions. Added and verified https version in ...
9
votes
2answers
1k views

Apache - How to NOT log 301 redirects

I recently re-designed my site and a lot of the URLs changed. I have already setup rewrite rules in Apache to redirect old URLs to the new URLs. That's all working. My question is, how can I get ...
8
votes
10answers
3k views

Is there a safe way to redirect traffic from a dozen old websites to a new (unrelated) website?

Over the years I've built over a dozen unsuccessful sites. They get 10-100 visitors per day each. The topics include all kinds of random things - recipes, hiking tips, military equipment, gym bloopers,...
8
votes
3answers
3k views

How do I temporarily disable a website?

I have to take a website down for a month, which is the least intrusive way to keep achieved SEO optimizations? should I just add in apache config: <Directory /root-directory-of-web-site-to-be-...
8
votes
3answers
2k views

When you move a site via a 301 redirect should you setup a robots.txt disallowing robots to crawl the old address?

A site I am working on moved a subdomain to another subdomain via a 301 redirect. However when checking robots.txt of the old subdomain, it has a robots.txt which disallows search engine web crawlers ...
8
votes
3answers
872 views

Is it a problem (e.g. for Google) when my site has no root page?

I have a multi-lingual site, which contains languages in this manner: http://www.example.com/en/ http://www.example.com/de/ http://www.example.com/fr/ To avoid duplicate links, is it ok not to have ...
8
votes
3answers
241 views

I want to test major changes on my website without hurting SEO

I want to replace all my website files for new ones on the server and to test if they work alright but I don't want to be crawled while this is happening or if I am, I don't want the crawler to be ...
8
votes
1answer
28k views

How can I redirect port 80 to a different port with Apache?

I have tomcat running on port 8080 and want a particular URL, lets say http://example.com/app, to actually point to example.com:8080/app I have other content on the website that should remain ...
8
votes
3answers
2k views

When redirecting from http to https in a shop site, which status code should I use?

On a shop website, when "Pay now" is clicked we perform a header redirection to the same URL, just an SSL secured https version. In such a common scenario, should we use a permanent (301), a ...
8
votes
3answers
553 views

Will redirecting expired domains to my website help or attract penalties?

I am developing a entertainment website and have found more than 4 entertainment domains (expired domains). Domain authority of these domains are 25 or more. If I will redirect these domain to my ...
8
votes
3answers
962 views

How do you direct iPhone/Android browser to m.example.com?

I have some special coding that only works for HTML5 browsers (simple geolocation stuff). I want to redirect iPhone and Android users to the m.example.com version of my website. How is the best way ...
7
votes
5answers
2k views

Redirect visitors when site is too busy

We're expecting a large spike in traffic to our website this week. If the site becomes overloaded (i.e. visitors are getting a 503 error), I want to redirect visitors to another web address. How would ...
7
votes
4answers
458 views

Why do some webmasters avoid putting direct links on their pages?

I've seen this more than often in many websites, that the webmaster avoids putting direct links on the page, instead they use a redirect such as following: http://www.example.com/?url=http://sample....
7
votes
1answer
2k views

Why is having no redirect between example.com and www.example.com wrong?

After asking this question: https://stackoverflow.com/questions/8042748/facebook-login-returns-error-message-if-domain-accessed-without-www-prefix I was told that using example.com and www.example....
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 ...
7
votes
3answers
4k views

.htaccess permanent redirect to www

I have a WordPress installation that is not redirecting URLs not starting with www. Example: http://example.com/dir/ doesn't send to http://www.example.com/dir/ instead goes to http://example.com/. ...
7
votes
3answers
4k views

Would redirecting to a new home page affect SEO?

I'm currently working on a new landing page for this site. I want the landing page to replace the existing front page of the site. However I don't want to lose the Page Rank of the current front page -...
7
votes
4answers
8k views

Will Google Analytics track URLs that just redirect?

I have a link on my site. That links goes to another URL on my site. The code on the server sees that resource being requested and redirects the browser to another website. Will Google Analytics be ...
7
votes
2answers
2k views

Is having a landing page for multi-country websites detrimental for search engine ranking?

I have a multi-language / multi-country website which uses a single domain name. The url structure is as follows: country-name.example.com/language/ Ex: ca.example.com/en/ ca.example.com/fr/ uk....
7
votes
4answers
461 views

How Late is Too Late to Redirect Pages of Domain for SEO

Our company recently had a new website designed for them to replace the old one that was literally made sometime in the mid-90's. The new site went live a couple of months ago. I have just been asked ...
7
votes
2answers
880 views

Proper status code for language redirection (301, 302, … 307)?

I have build a websites with multiple languages. The URLs look like: http://www.example.com/en/ http://www.example.com/de/ If the user access the main domain http://www.example.com/ the web server ...
7
votes
3answers
274 views

How to re-direct Wordpress posts with 301

All my WordPress post URLs generate sub directories with duplicate content and I do not know what regular expression to use to consistently 301 redirect domain.com/category/post/random-number/ to ...
7
votes
1answer
176 views

Redirecting from Wordpress.com site to Wordpress.org with SSL

I am in the process of transferring a Wordpress.com site to Wordpress.org. The old site domain: https://oldsite.wordpress.com. The new site domain: https://newsite.com. I am facing a dilemma on the ...
6
votes
3answers
1k views

Should I redirect desktop users visiting mobile page to desktop version?

So I am redirecting mobile users to mobile version of the page and also have alternate attrubute set up for that: <link rel="alternate" media="only screen and (max-width: 640px)" href="http://m....
6
votes
2answers
237 views

We changed our URL and our impressions dropped almost 100%

The company I worked for changed their domain about a month ago and updated the URLs for all of the pages. We mostly removed the .aspx from the ends and decreased the depth of many of our pages. We ...
6
votes
5answers
2k views

When responding with a HTTP 3xx Redirect status, should there still be a response body?

When a service is answering an HTTP request with a "3xx Redirect" status code response (and the accompanying Location header) should it still send a meaningful response body along with the response? ...
6
votes
5answers
5k views

301 redirected an entire website 4.5 months ago; still showing up in Google search results?

Consolidated two websites on December 9, 2013; a site wide page-to-page 301 redirect was implemented which redirects site A to site B Website A (the one being redirected) is: Still showing up in ...
6
votes
6answers
2k views

Are there downsides to using a 301 redirect from a shorter URL on our own domain rather than using a URL shortener service?

Wondering if there are any negative implications to using a redirect on my own domain as a kind as a URL Shortener. I am often asked by folks creating printed documents for "short URLs". My ...
6
votes
3answers
152 views

Will data be encrypted if an HTTP page POSTs to a HTTPS handler that redirects back to HTTP?

My host gave me a subdomain of their domain that has HTTPS: https://mysite.example.com My own domain name has no SSL installed, so the only way I can take advantage of encryption is by using the ...
6
votes
2answers
4k views

Serve a different robots.txt file for every site hosted in the same directory

We have a global brand website project for which we are only working the LATAM portion. There is a website installation process here that allows to have one website installation with several ccTLDs, ...
6
votes
2answers
767 views

Multiple top level domains - should I redirect/rewrite or leave them?

I operate a website with many different TLD's (top level domains): example.com example.org example.co.uk example.org.uk The website is advertised as example.org.uk but I expect that lots of people ...
6
votes
3answers
1k views

Is an .htaccess edit necessary when enabling Cloudflare SSL?

I have recently changed 3-4 of my sites to Cloudflare SSL. After that, I went to General Settings on WordPress and changed URLs from HTTP to HTTPS. And it redirects from HTTP to HTTPS without any ...
6
votes
2answers
5k views

How can my site detect mobile phones and switch visitors to a mobile Domain?

My Question is that when user enter the website: http://www.example.com then they will just go to automatically to http://www.example.mobi how can i do this .. is their any technique behind that. ...
6
votes
2answers
1k views

How to submit shortened URLs to Google so that they are included in the index

I am working on a project to create a URL shortener. I have successfully gotten it to create short URLs, but I would like to submit them to Google. When I submit a short URL via Google Webmaster ...
6
votes
2answers
3k views

Multiple sites redirected to one main site

I have a client who insists of having multiple website domains all being redirected to one main website domain. It is getting out of hand and his server has become conveluted and riddled with garbage ...
6
votes
1answer
1k views

Should I use 301 or 302 for location-based redirects?

I'm setting up geo-redirects for my site and am unsure which redirect type to use. I've read many articles on this subject, but still do not have a clear answer. Here's the plan: Visitor lands on ...
6
votes
2answers
3k views

Redirect/rewrite dynamic URL to sub-domain and create DNS for subdomain

I have created an application in PHP, I would like to re-direct the following URL to corresponding sub-domain. Dynamic URL pattern: http://mydomain.com/mypage.php?user_name=testuser I wish to re-...
6
votes
2answers
828 views

Is a masked 307 redirect for a domain possible?

I've been asked to create a 307 redirect for a domain, ensuring it is "masked". i.e. keep the original URL in the address bar. There isn't a lot of info available about 307 (as opposed to 301/302) ...
6
votes
1answer
3k views

redirect various http domains to certain https domain via htaccess

I have a bunch of domain names with different TLDs. What I want is to point several domains to the "main"-domain which has a SSL cert (single domain). Like this: https://maindomain.com (main domain ...
6
votes
2answers
1k views

Does a 303 status code pass page rank?

I'm doing an audit for a client who has a 303 redirect on his site from: example.com to example.com/en/. I personally would have used a 301 redirect, but I want to know if a 303 passes page rank the ...