Avoid landing page redirects
-
Avoid landing page redirects for the following chain of redirected URLs.
Anyone know how to solve this issue the correct way?
-
Oh, sorry. Somehow I didn't get any notification on your reply.
For IIS you could go with web.config of your website. The code will be something like:
<rule name="Force WWW and SSL" enabled="true" stopprocessing="true"><match url="(.*)"><conditions logicalgrouping="MatchAny"><add input="{HTTP_HOST}" pattern="^[^www]"><add input="{HTTPS}" pattern="off"></add></add></conditions>
<action type="Redirect" url="https://www.domainname.com/{R:1}" appendquerystring="true" redirecttype="Permanent"></action></match></rule> -
We are using IIS as a web server, not Apache.
-
Thanks Istvan.
Where would I place this code?
-
Agreed! Forcing the rewrite will solve the problem, I'm guessing OP is currently using 301 redirects to send people to HTTPS.
-
Hi Sammy,
If I understand your question, you need help with htaccess code to force both https and www with same rule? If so, this might be what you are looking for:
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www.domainname.com$ [NC]
RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301]
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Very wierd pages. 2900 403 errors in page crawl for a site that only has 140 pages.
Hi there, I just made a crawl of the website of one of my clients with the crawl tool from moz. I have 2900 403 errors and there is only 140 pages on the website. I will give an exemple of what the crawl error gives me. | http://www.mysite.com/en/www.mysite.com/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | http://www.mysite.com/en/www.mysite.com/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/index.html#?lang=en | | | | | | | | | | There are 2900 pages like this. I have tried visiting the pages and they work, but they are only html pages without CSS. Can you guys help me to see what the problems is. We have experienced huge drops in traffic since Septembre.
Technical SEO | | H.M.N.0 -
What is the best way to redirect visitors to certain pages of your site based on their location?
One website I manage wants to redirect users to state specific pages based on their location. What is the best way to accomplish this? For example a user enters the through site.com but they are in Colorado so we want to direct them to site.com/colorado.
Technical SEO | | Firestarter-SEO0 -
Take a good amount of existing landing pages offline because of low traffic, cannibalism and thin content
Hello Guys, I decided to take of about 20% of my existing landing pages offline (of about 50 from 250, which were launched of about 8 months ago). Reasons are: These pages sent no organic traffic at all in this 8 months Often really similiar landing pages exist (just minor keyword targeting difference and I would call it "thin" content) Moreover I had some Panda Issues in Oct, basically I ranked with multiple landing pages for the same keyword in the top ten and in Oct many of these pages dropped out of the top 50.. I also realized that for some keywords the landing page dropped out of the top 50, another landing page climbed from 50 to top 10 in the same week, next week the new landing page dropped to 30, next week out of 50 and the old landing pages comming back to top 20 - but not to top ten...This all happened in October..Did anyone observe such things as well? That are the reasons why I came to the conclustion to take these pages offline and integrating some of the good content on the other similiar pages to target broader with one page instead of two. And I hope to benefit from this with my left landing pages. I hope all agree? Now to the real question: Should I redirect all pages I take offline? Basically they send no traffic at all and non of them should have external links so I will not give away any link juice. Or should I just remove the URL's in the google webmaster tools and take them then offline? Like I said the sites are basically dead and personally I see no reason for these 50 redirects. Cheers, Heiko
Technical SEO | | _Heiko_0 -
Duplicate pages
Hi Can anyone tell me why SEO MOZ thinks these paes are duplicates when they're clearly not? Thanks very much Kate http://www.katetooncopywriter.com.au/how-to-be-a-freelance-copywriter/picture-1-58/ http://www.katetooncopywriter.com.au/portfolio/clients/other/ http://www.katetooncopywriter.com.au/portfolio/clients/travel/ http://www.katetooncopywriter.com.au/webservices/what-i-do/blog-copywriter/
Technical SEO | | ToonyWoony0 -
Will one line of duplicate content drag down my landing page?
I am using copyscape to check for duplicate content on my landing pages. I found three sites that have the exact same sentence as mine, on a page that I rank well for on one of two key terms related to the product. The sentence is not essential to my product page. Do I risk losing page one rank on a key search term when I remove that sentence on my site, in hopes of possibly improving the page on the second key search term? Do I leave it alone? This is an older "template" site with very little that I can do SEO-wise, and I have managed to get a few key prodcut landing pages on page one of Google. It has seen a drop in rank on many landing pages post-panda, and I'm doing my best to clean up what I can. Do I leave well enough alone for a page one rank on one term, or swap out that sentence in hopes of getting better rank on two keywords?
Technical SEO | | Ticket_King0 -
What should be use 301 or 302 redirection for 404 pages
Please suggest which redirection we should use for 404 pages- 301 or 302. If you can elaborate it with reason then it will be highly appreciated.
Technical SEO | | koamit0 -
Event Landing Pages not ranking
Hi there I need to optimize the website of a club/concert venue. The site isn't bad and has authority, but the event pages don't seem to rank and I'm unsure about the reason. There is an overview page of the events: http://www.kaufleuten.ch/events/ What happens currently when clicking on a specific event (on "WEITER", top right of each event) is that users get redirected to a hashtag page by jQuery. The href of "WEITER" itself links to another landing page (which is IMO the one we should see ranking for the specific event). Here is a concrete example: Look at the event "Tanz & Konzert: Andreas Vollenweider, Seven & ROKPA-KIDS" on /events by clicking on "WEITER", you get directed to http://www.kaufleuten.ch/events/#2790/andreas-vollenweider the actual "WEITER" link in the source code though, points to the landing page http://www.kaufleuten.ch/event/andreas-vollenweider/ This seems to be done by an AJAX load: jQuery loads a DIV with the ID "ajax-content". Apparently, this is the code responsible for it: $(„.link“, click(function() {
Technical SEO | | zeepartner
el.find('.wrapper').load(target+' #ajax-content', function() {
});
return false;
}); I know the site has good authority and should rank well. however, the event landing pages never seem to appear, but only the page /events is ranking: SERP
(Strangely, when using the site command, the event page suddenly appears above: SERP. (But I have never seen this in a "normal search query", even though we are the organisers and should at least be among the top 5). Now my question: Does Google consider this AJAX load to be some sort of cloaking? (because the href in the code is different to you actually end up by clicking "WEITER"). Will the landing pages begin to rank if we disable this AJAX load? Or should we stick to hashtags and not even create landing pages? (but then, we will have no control over title tags of specific events, right?) Thanks for your help, I'm a bit lost here as my JS knowledge is meagre... Cheers,
Phil0 -
Is a 302 redirect the correct redirect from a root URL to a detail page?
Hi guys The widely followed SEO best practice is that 301 redirects should be used instead of 302 redirects when it is a permanent redirect that is required. Matt Cutts said last year that 302 redirects should "only" be used for temporary redirects. http://www.seomoz.org/blog/whiteboard-interview-googles-matt-cutts-on-redirects-trust-more For a site that I am looking at the SEO Moz Crawll Diagnostics tool lists as an issue that the URL / redirects to www.abc.com/Pages/default.aspx with a 302 redirect. On further searching I found that on a Google Support forum (http://www.google.com/support/forum/p/Webmasters/thread?tid=276539078ba67f48&hl=en) that a Google Employee had said "For what it's worth, a 302 redirect is the correct redirect from a root URL to a detail page (such as from "/" to "/sites/bursa/"). This is one of the few situations where a 302 redirect is preferred over a 301 redirect." Can anyone confirm if it is the case that "a 302 redirect is the correct redirect from a root URL to a detail page"? And if so why as I haven't found an explanation. If it is the correct best practice then should redirects of this nature be removed from displaying as issues in the SEO Moz Crawll Diagnostics tool Thanks for your help
Technical SEO | | CPU0