Www redirect
-
I get the following message when I try to start a new campaign.
"We have detected that the domain www.shewula.nl and the domain shewula.nl both respond to web requests and do not redirect"
In the q&a I found answers to this problem and tried to fix it. No success yet.
This is what I have in my old ht.access file:
RewriteCond %{HTTP_HOST} ^www.shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
RewriteCond %{HTTP_HOST} ^shewula.nl$
RewriteCond %{REQUEST_URI} !^/STICHTING_SHEWULA/
RewriteRule (.*) /STICHTING_SHEWULA/$1 [last]
I changed it to ( got it from the answers
RewriteCond %{HTTP_HOST} ^shewula.nl
RewriteRule (.*) http://www.shewula.nl/$1 [R=301,L]This gave me a 500 internal error in the server header checker tool.
Does anybody know how I can fix this?
The website is in a folder in the root of my other website www.fastingfotografie.nl
Could this give me a problem?
Thanks.
Thomas
-
Thanks Valery. Your code is working too.
I can start with the campaign now.
Regards,
Thomas
-
Here's what you need:
RewriteCond %{HTTP_HOST} !^www.shewula.nl [NC]
RewriteRule ^(.*)$ http://www.shewula.nl/$1 [R=301,L]The 500 error is because you were not escaping the . in your regex on the first line.
The code here will only redirect if it doesn't have the www.
-
<code>``` <code>Your changed one is missing the wildcards. Unless I'm wrong, it would only</code>
<code>match 'shewula.nl' exactly, and not anything else.</code>
<code>This might work, but I'm just eyeballing it and am not good with regex:</code> ```</code>
<code>RewriteCond %{HTTP_HOST} !^(.).shewula.nl(.)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code><code>edit-ugh stupid editor auto-inserting code blocks</code> ```
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
-
Using keywords in my URL: Doing a redirect to /keyword
My website in "On Page Grade" received an A.Anyway, I only have 1 thing to optimize:_"Use Keywords in your URL__Using your targeted keywords in the URL string adds relevancy to your page for search engine rankings, assists potential visitors identify the topic of your page from the URL, and provides SEO value when used as the anchor text of referring links."_My website is ranking in top10 for a super high competitive keyword and all my others competitors have the keyword on their domain, but not for my URL.Since I can't change my domain for fixing this suggestion, I would like to know what do you think about doing a 301 redirect from / to mydomainname.com/keyword/So the index of my website would be the /keyword.I don't know if this can make a damage to my SERP for the big change ir it would be a great choice.
On-Page Optimization | | estebanseo0 -
Temporary redirections
Hi all, after crawling my website the SEOMOZ software has warned me about temporary redirections like these: What should I do? What consequences could it have in the SERPSs? Thanks. http://www.tarifakitesurfcamp.com/campamento-bilingue-para-ninos/
On-Page Optimization | | juanmiguelcr
http://www.tarifakitesurfcamp.com/campamento-bilingue-para-ninos/
http://www.tarifakitesurfcamp.com/error-404 http://www.tarifakitesurfcamp.com/campamento-de-kitesurf/
http://www.tarifakitesurfcamp.com/campamento-de-kitesurf/
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/condiciones-generales/www.tarifakitesurfcamp.com
http://www.tarifakitesurfcamp.com/condiciones-generales/www.tarifakitesurfcamp.com
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/en/about-tks/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/en/about-tks/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/en/page-not-found/ http://www.tarifakitesurfcamp.com/gisela-pulido-escuela/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/gisela-pulido-escuela/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/ENCLAVE_3.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/ENCLAVE_3.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/MATERIAL_KITE_3.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/MATERIAL_KITE_3.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/campamento-kitesurf-orca.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/campamento-kitesurf-orca.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/expertos2.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/expertos2.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/gisela.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/gisela.jpg
http://www.tarifakitesurfcamp.com/error-404/0 -
Is it redundant to include a redirect to my canonical domain (www) in my .htaccess file since I already have the correct rel="canonical" in my header?
I've been reading the benefits of each practice, but not found anyone mentioning whether it's really necessary to do both? Personally I try to stay clear of .htaccess rewrites unless it's absolutely necessary, since because I've read they can slow down a website.
On-Page Optimization | | HOPdigital0 -
Losing Page Rank after 301 redirect from http to www
Hi Guys I have site-wide redirected all http// to www and all the category pages lost their page ranks (except home page). I would like to know if this is normal and is it one of the possible causes in losing keyword ranking?
On-Page Optimization | | ilovebodykits0 -
Lost Page Rank after directing http:// to WWW?
Hi I am trying to redirect all the non www urls to WWW. After I redirected them, most of my category page PR are dropped to 0. Can someone please tell me if this is the normal after effect after the redirect? Example url: this is PR2 before the redirect http://www.ilovebodykits.com/category/95/Body_Kits_Front_Bumpers.html
On-Page Optimization | | ilovebodykits0 -
Which is better, a directory 301 redirect or each page in the directory?
A customer of mine has a site with lots of articles and they are all quite spammy. They have not been affected by penguin yet so they asked what to do. I suggested losing the articles directory and 301 redirect to either the home page or another important page. Would a 301 redirect on the entire directory to a single page be the way to go or add redirects from each page within the directory and spread out redirects to various pages in website? Or do you have a better suggestion?
On-Page Optimization | | anthonytjm0 -
Www vs "non" www site addresses and SEO
I first apologize for the lame question title - didn't really know how to word it... I'm having a bit of a conundrum and cannot figure out whats going on, but in the mean time I thought I would ask to see if its hurting my ranking. My site at www.ap-mg.com is built on WordPress using the Thesis them by DIY (just a little upfront info). I am very careful to make sure that all my links are in a particular format i.e. http://www.ap-mg.com - on my site, as well as other sites I have my profile on. My site also used to be hosted on the /home directory until about a month ago. My problem is that when I click on the DA MoxBar link while at my sites homepage, it takes me to Open Explorer, but to ap-mg.com and shows no results - I then add the www to the front of the address and vuala - results. But then the second issue I'm having is then it tells me that my site is redirecting the the /home directory, which its not and I'm still trying to figure that one out. So with all the craziness with my site, www, no www, /home....is this killing any chance of real ranking?
On-Page Optimization | | apmgsmith0 -
Necessary to redirect non-www to www?
Hello All, I've read quite a bit on here and the Matt Cutts blog http://mattcutts.com/blog/seo-advice-url-canonicalization/ about non-www vs www. I''ve also read a few recent posts on here but still left a little confused. First, my site is PR 4. We don't have many links, but the ones we do have (including internal) point to the www.example.com. You can also get to our site by typing example.com and it will not switch to the www. version. Both versions have the PR4, I just want to make sure I'm not losing any PR or juice between the different versions. My question, would you advise 301 redirect to the www version? if so, I have Godaddy as our host, is it as simple as going into the hosting control and doing the redirect there?
On-Page Optimization | | someoneguy0