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
-
My home page URL http://seadwellers.com/ redirects to http://www.seadwellers.com/. Is this a problem?
"The URL http://seadwellers.com/ redirects to http://www.seadwellers.com/. Do you want to crawl http://www.seadwellers.com/ instead?" I was given this when I tried to crawl my home page using MOZ software. I was not aware of this, do not know if it could be a problem concerning any aspect of SEO, etc? :
On-Page Optimization | | sdwellers0 -
My report is showing duplicate titles.. for http://www.mysite.com/ & http://mysite.com
Is this because I setup my campaign wrong in seo moz or should I have my site setup differently to forward all traffic without the www to the www version? Or vise versa? Thanks for any advice!
On-Page Optimization | | Fridaythe15th0 -
Can you 301 redirect to a page that has other pages 301 to it?
Two years ago updated url page to include better keywords and used a 301 redirect from the old page to the new. so www.example.com/keyword-1st-generation.html now points to ... www.example.com/keyword-2nd-generation.html That moved the pages up in ranking, but now have better kw for the url, so is it okay to redirect the /keyword-2nd-geration-html to www.example.com/keyword-3rd-generation.html And what is a good length of time before removing the 1st-generation url? It's been 3 years and there is no chance of using it again. Plus, no sign of it in analytics.
On-Page Optimization | | AllIsWell0 -
Redirecting URLS on windows
Could anyone help out here please. A client of ours have reveloped their website from HTML to ASP (helpful!). They have 60 odd pages indexed in Google with the .html extension. We need to do a redirect on these pages so that all link juice is passed to the new pages. What would be the best way to do this please?
On-Page Optimization | | Grumpy_Carl0 -
With or without the "www." ?
Is there any benefit whatsoever to having the www. in the URL? My domain is quite long therefore I've not been using the www. however a few people have mentioned it's good practice to include it. The www. forwards to the main URL (non www.) and I've set my preferred domain name in webmaster tools to the non www. so I'm thinking that should all be ok. Just hoping I could get some of the experts views to make sure this is all ok. The site is a year old and I'm just starting to really get going on the link building so it's not too late to change if I'm wrong. If others link to my site and include the www. will the link juice be passed, as I suspect many will include it without any thought?
On-Page Optimization | | Optimise0 -
Http://www.xxxx.com does not re-direct to http://xxx.com
When typing in my website URL www.earthsaverequipment.com successfully re-directs to earthsaverequipment.com as specified in robot. However if you type http://www.earthsaverequipment.com it brings up a 404 error Is this a potential issue? if so is there a way to fix it? thanks
On-Page Optimization | | Earthsaver0 -
301 redirect and then keywords in URL
Hi, Matt Cutts says that 301 redirects, including the ones on internal pages, causes the loss of a little bit of link juice. But also, I know that keywords in the URL are very important. On our site, we've got unoptimized URLs (few keywords) in the internal pages. Is it worth doing a 301 redirect in order to optimize the URLs for each main page. 301 redirects are the only way we can do it on our premade cart For example (just an example) say our main (1 of the 4) keywords for the page is "brown shoes". I'm wondering if I should redirect something like shoes.com/shoecolors.html to shoes.com/brown-shoes.html In other words, with the loss of juice would we come out ahead? In what instances would we come out ahead?
On-Page Optimization | | BobGW0 -
Is the www and non www isue realy seen by Google as duplicate content?
I realy don't understand how Google could posibly devaluate a link because the site displays the same content with www and without www. I mean did somebody recently saw a devaluation of a domain because of this isue? I somehow can not belive this because it is the standard when geting a new webspace that the new website display the same content with and without www. Is a redirect realy necessary?
On-Page Optimization | | MichaelJanik0