I'm using an Elastic IP and have created an A record of my domain to that IP. (Host=@ and "Points to" is the IP)

Google has indexed this domain accordingly but it also has indexed the public DNS (ec2-...amazonaws.com).

I assume Google will ding me for duplicate content, have I done something wrong?

Should I have a redirect in my htaccess of ec2...amazonaws.com to my domain name?

  • 1
    I wouldn't be surprised if Google mostly ignored the amazonaws.com domain for purposes of duplicate content. A canonical domain redirect never hurts, though. – ceejayoz Jun 17 '13 at 21:12

Yes, I suggest you put in a redirect for anything that is not your canonical domain.

If you are using a virtual host in Apache this is usually not a problem as it will only respond to the domains you specify in a ServerName or ServerAlias directive.

Regardless, you can use mod_rewrite to be sure. See this answer on StackOverflow for a good explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.